Skip to main content

Full text of "TRS-80 Microcomputer News - Volume 5 Issue 06 (1983-06)(Radio Shack)(US)"

See other formats


Volume 5. Issue 6 June, 1983 



Microcomputer News 



Graphics Issue 

The TRS-80 Micro 
Color Computer 

A Tribute to Columbia 





Fort Worth Scene 



First we want to thank all those who submitted graphics 
programs. We received many more than available space 
permits us to publish. When we started looking through the 
reader submitted programs, we found— as usual— a dispro- 
portionate number of programs for the Color Computer— 
especially in Extended Color BASIC. For Model I/III owners, 
"Tribute to Columbia" provides very nice graphics and a 
tutorial on the Columbia space program. We hoped to re- 
ceive at least one or two programs written for the Model II or 
III graphics boards, but after searching through the files, we 
came up empty handed. We're still waiting for those pro- 
grams to arrive. 

Although not a graphics program, a Model 11/12 pro- 
gram for listing a BASIC program in an attractive format 
creates great looking print outs, 

ANOTHER NEW COMPUTER 

1 983 has been a great year for TRS-80s. We've seen the 
introduction of the Models 4, 12. 100. and the Pocket 
Computer 4. Still another new computer, the TRS-80 Micro 
Color Computer (Model MC-10), is introduced in this issue. 
Color, graphics, and BASIC programming capability along 
with a very modest price make the MC-10 a great buy for 
anyone wanting to own a real computer without making a 
major investment. The MC-10 screen was created by a pro- 
gram which was written for the Color BASIC Computer, but it 
runs on the MC-10 without any modifications. 

TO ALL CONTRIBUTORS 

When submitting programs for publication, please indi- 
cate which machine the program was written for and include 
any documentation that might clarify the operation of the 
program. 

Often we receive media on a S 1 /-*" diskette or a tape with 
no indication of which computer the program will run on. We 
scratch our heads wondering if it is for the Color Computer, 
Model L or Model III. 

GARBAGE OUT AIDS POTENTIAL THIEVES 

Mr, C. Laurence Gott of Dallas, Texas, a member of a 
Neighborhood CrimeWatch group, sent us the following 
news item. 

The Dallas Police advise purchasers of large appliances 
such as stoves, refrigerators, washers, home comput- 
ers, and the like to NOT PUT their packing carton on the 



curb (or wherever) with the trash to be picked up in the 
normal course of garbage collection. This gives obser- 
vant looters and others working for black- 
marketeers information regarding new major items in 
your hoii§e. Rather, take the packing case immediately 
to the dump or to a large neighborhood dumpster (with 
permission from the owner, of course.) 
The January cover of TRS-80 Microcomputer News in- 
spired Mr. Gott to send us the above information, and we 
publish it in the hope that by making our readers more aware 
of potential threats, you will not become a victim. J3 



MAGAZINES 

Below are five magazines of special interest to TRS-80 
owners that we believe have editorial content of high quality 
and will be of use to our customers. 

80-US {Covers all TRS-80's) 

3838 South Warner Street 

Tacoma, WA 98409 

(206)475-2219 

Color Computer Magazine 
Highland Hill 
Camden. ME 04843 
{207)236-9621 

Color Computer Weekly 
P.O. Box 1355 
Boston, MA 02205 

Rainbow (Covers the TRS-80 Color Computer) 
5803 Timber Ridge Dr. 
Prospect KY 40059 
{502)228-4492 

two/sixteen magazine 

P.O. Box 1216 

Lancaster, PA 17603 

(717)397-3364 J2 




The new TRS-80 Micro Color Computer with Radio Shacks 5" color 
television is featured on this month's cover. 



TRS-80 Microcomputer News, June 1983 



TRS-80 Microcomputer News 

Volume 5 1Ilklc ,.„„„ Issue 6 

JUNE 1983 

TRS-80 Microcomputer News is published monthly 
by Radio Shack, a division of Tandy Corporation, One Tandy 
Center, Fort Worth, Texas USA. 76102, Copyright 1983 by 
Tandy Corporation, One Tandy Center, Fort Worth, Texas 
USA, 76102. All rights reserved 

Reproduction or use, without express written permission 
from Tandy Corporation, of any portion of the Microcomputer 
News is prohibited. Permission is specifically granted to individ- 
uals to use or reproduce material for their personal, non- 
commercial use Reprint permission for all material (other than 
Ivan Sygoda's Profile article), with notice of source, is also 
specifically granted to non-profit clubs, organizations, educa- 
tional institutions, and newsletters. 

TRS-80 Microcomputer News is published monthly by 
Radio Shack, a division of Tandy Corporation A single six 
month subscription is available free to purchasers of new full 
size TRS-80 Microcomputer systems with addresses in the 
United States, Puerto Rico, Canada and APO or FPO ad- 
dresses Certain smaller TRS-80 Microcomputers will not in- 
clude this free subscription Subscriptions to other addresses 
are not available. 

The subscription rate for renewals and other interested 
persons with U.S., APO or FPO addresses is twelve dollars 
($12.00) per year, check or money order Single copies of the 
Microcomputer News may be purchased from Radio Shack 
Computer Centers or Computer Departments for $1,50 sug- 
gested retail each. 

The subscription rate for renewals and other interested 
persons with Canadian addresses is Fifteen dollars ($1 5.00) per 
year, check or money order in U.S. funds All correspondence 
related to subscriptions should be sent to- Microcomputer 
News, P.O. Box 2910, Fort Worth, Texas 76113-2910 

Retail Prices in this newsletter may vary at individual stores 
and dealers The company cannot be liable for pictorial and 
typographical inaccuracies 

Back issues of Microcomputer News prior to January, 1981 
are available through your local Radio Shack store as stock 
number 26-2115 (Suggested Retail Price $4 95 for the set) 
Back issues of 1981 copies are available as stock number 26- 
2240 (Suggested Retail Price $9.95 for the set) 

The TRS-80 Newsletter welcomes the receipt of computer 
programs, or other material which you would like to make avail- 
able to users of TRS-80Microcomputer systems In order for us to 
reprint your submission, you must specifically request that your 
material be considered for reprinting in the newsletter and pro- 
vide no notice that you retain copyrights or other exclusive rights 
in the material.. This assures that our readers may be permitted 
to recopy and use your material without creating any legal 
hassles. 

Material for publication should be submitted on magnetic 
media (tape, disk, or CompuServe), If you submit material on 
tape or disk, and it is accepted for publication, we will send you 
two cassettes or diskettes for each one you sent us Cassettes 
will come from our box of mixed blank cassettes If you submit 
material on CompuServe, and we think we may use the mate- 
rial, we will extend your Microcomputer News subscription by 
six months for each article accepted If you are submitting 
material over CompuServe, please include your name and ad- 
dress or your subscription number so we can find you If the 
material is very short, send it to us in E-Mail.. If you have more 
than a few lines, you need to place the material in the ACCESS 
area of CompuServe and then let us know it is there by leaving a 
message on E-Mail 

Material may be submitted by mail to P.O. Box 2910, Fort 
Worth, Texas 76113-2910, or through CompuServe The 
Microcomputer News' CompuServe user ID number is 
70007,535 

Programs published in the Microcomputer News are pro- 
vided as is, for your information While we make reasonable 
efforts to ensure that the programs we publish here work as 
specified, Radio Shack can not assume any liability for the 
accuracy either of the programs themselves or of the results 
provided by the programs 

Further, while Microcomputer News is a product of Radio 
Shack, the programs and much of the information published 
here are not Radio Shack products, and as such can not be 
supported by our Computer Customer Service group If you 
have questions about a program in the Microcomputer News, 
your first option is to write directly to the author of the program 
When possible, we are now including author's addresses to 
facilitate communications If the address is not published, or if 
you are not happy with the response you get, please write us 
here at Microcomputer News We will try (given the limited size 
of our staff) to find an answer to your question and, in many 
cases, will publish the answer in an up-coming issue of Micro- 
computer News 

Trademark Credits 

CompuServe™ CompuServe, Inc 

CP/M® Digital Research 
Dow Jones™ 
NEWS/RETRIEVAL 

Service® Dow Jones & Co., Inc. 

LDOS™ Logical Systems, Inc. 

VisiCalc® VisiCorp, Inc. 

XENIX™ Microsoft 

Program Pak™ Tandy Corporation 

SCRIPSIT™ Tandy Corporation 

TRSDOS™ Tandy Corporation 

TRS-80® Tandy Corporation 



Contents: 
Color Computer 

The New TRS-80 Micro Color Computer by Linda Miller 16 

Programs 

Bargraph by Dennis L. Hargens 46 

Hydrate by James W. Wood 40 

Lettering on the Color Computer by Ronald T Graff 42 

SINE/COSINE/TANGENT Graph by Charles Robert Kelly II 43 

USA Flag for the Color Computer and MC-10 by Calvin C. Epple 47 

Communications Corner by Al and Dm Simon 20 

Computer Clubs 39 

Computer Customer Service 4 

Scripsit Plotter Driver 
Data Bases 

AgriStar 18 

Charting— An Important Electronic Marketing Tool for Agriculture 
by Kathryn Frame 
CompuServe 27 

Telidon, Graphics of the Near Future 
Profile 8 

At Home With Profile III + 

Education 

Color PILOT by George Gerhold 25 

High Motivation Reading from Radio Shack 14 

Fort Worth Scene 2 

General Interest 

Educational Computer Consortium of Ohio 5 

Model I/III/4 
Programs 

A Tribute to Columbia by Arnold E, van Beverhoudt, Jr 34 

Model 11/12 
Programs 

Document Listing for the Model II by Jean-Pierre Radley 32 

Notes on Previous Newsletters 29 

July/August 1982 

Fireworks 
November 1982 

Printing Titles 
February 1983 

Periods to Commas in Data Statements 

Variable Swapping 
March 1983 

Resistor Color Code Interpreter 

Pocket Computer 

AREAD— The PC-2 Automatic Read by Peter Levy 30 

Programs 

Greek Flag by N. E. Boulware 31 

Magic Square by Robert K. Phelps ' ] 45 

Peripherals 

The DMP-21 00— Revisited by Annette Zamberlin-Main 6 

Programs 

Graphic Printouts for the C0C0 and the CGP-1 15 by Howard C. Price .... 43 

Grid for the CGP-1 15 by Otis D Sullivan "28 



Prices shown in TRS-80 MICROCOMPUTER NEWS are in U.S. Funds. 




TRS-80 Microcomputer News, June 1983 



Computer Customer Service 



Scripsit Plotter Driver 



The Scripsit Plotter Driver package (Catalog no. 
26-4536, suggested retail $49.00) is a fast, easy way to use 
the Radio Shack Multi-Pen Plotter (Catalog no. 26-1191, 
suggested retail $1995.00) to produce colorful, striking 
graphics from your Model II, 12, or 16 in a relatively short 
period of time. Even if you have never used a graphics 
package in the past, you can create professional looking 
graphics on your first attempt. The six-pen plotter can be 
used to make reports with eye-catching charts and diagrams, 
journal articles and professional papers with graphs and 
block diagrams built right into the text, overhead transparen- 
cies for lectures and sales presentations, and any number of 
posters and fliers. 

Let's take a look at the features of the Scripsit Plotter 
Driver. There are several features that control how your final 
document will look. The first of these is Format. Format tells 
the plotter that the document will be a vertical or a horizontal 
document, in much the same way that the Create New Docu- 
ment menu in Scripsit 2.1.0 does. You Format a document by 
the use of Scripsit Printer Control Codes. Merely type 
(CTRL ) QD (the two keys together, in either capital or lower 
case), then the letter " F" for format, followed by either a "V" or 
an "H" for Vertical or Horizontal. 

The second feature that can affect how your document 
will look is Size. Size determines how large your characters 
will be. This can vary greatly depending on placement on the 
page, format used, and type of usage. For example, you may 
want to have one size for text within a diagram, another size 
for captions, and yet another size for titles and subheadings. 
Keep in mind that the plotter driver can produce an entire 
document consisting of text as well as graphics. When you 
want to define the text size, type a (Ctrl] QD, then the 
letter GD for Size, followed by a number between 1 and 9. 
Here is an example of size 1 through 9 text. 



/ \ 




7 6 5 



4 3 



2 i 



Figure 1. 



For convenience, the Scripsit Print Control Codes do not 
take up any physical space in the document. When you want 
to tell the plotter which of the six pen colors to use, type a 
CcTrlD CED then a letter CD for Pen, followed by a number 
between 1 and 6. The default pen color is 1 (black). 

Now that you have defined the basics of your document, 
you will want to decide on the types of graphics you want to 
produce. You will probably rely on the Tandygraph program 
to produce any line graphs, pie charts, or bar graphs for your 
business reports and professional papers, but such items as 



an organizational chart or a flowchart for time-series analysis 
or diagramming a computer program is beyond the Tandy- 
graph's ability, and you will have to rely on the features of the 
Scripsit Plotter Driver. The plotter driver has two commands 
that make it easy for you to get started. The first is Box. Box 
lets you define a box of any size and shape wherever you 
desire on the page. To define the upper left corner of a box 
type ( c t R O QD, then the letter GD, followed by a number 
between 1 and 9. Scripsit will only allow you to define up to 9 
boxes at one time. You can now fill that box with text, other 
boxes, or other graphics. To define the lower right corner of 
the box, type (CTRL) QD, then the letter QD again, followed 
by the same box number you used to start the box. 

The next feature you will want to be familiar with is Line. 
Drawing a line is very similar to creating a box. To start a Line, 
type a (ctrl) GD, then a letter CED, followed by a number 
from 1 to 9. Position this start where you want the line to start 
in the document. To end the line, type fCTRD GD, then the 
letter QD.followed by the number you used to start the line. 
Finally, the last feature you can use to define graphics is 
the External Program Mode. With this command you can 
access the command language of the plotter and use it to 
produce highly customized graphic constructs. The possibili- 
ties available with this command would require another arti- 
cle. This command can be used to produce a circle. For 
example, to send a command to the plotter to plot a circle, 
first type in (ctrl) QD, then the letter QD followed by the 
command to draw a circle (ECC 200,0). When you are fin- 
ished sending commands to the plotter, type ( c t r Q CED, 
followed by the letter QD to end the command. 

There are some other features that we should mention 
before moving on to some simple examples. One is the 
Dummy command. The Dummy command allows you to fill 
in areas of space to help you line up graphics on the page. To 
create dummy space type Cctrl) QQ, then the letter CED, 
followed by a number from 1 to 9. Another feature is double- 
strike feature. This can come in handy when starting up a dry 
pen. Lastly, you can half-space and produce overstrike 
characters. 

Now for a quick example to show you how easy it is to 
produce neat professional looking graphics in no time at all. 
First open a document on your Scripsit 2.0 or later diskette, 
which has the control codes copied from the Scripsit Plotter 
Driver diskette. Don't worry about the format or the line 
format, as we will set that once we are in the document. 

Set the line format by typing (ctrl) CED and edit the 
format line to delete the outline tab. Set the Format of the 
document as vertical by typing (ctrl)SD, then CE). a nd 
then QD. Set the Size for 2 by typing (ctrl) CKD, then dD, 
then GD. Now press (enter) to begin a new line. Type 
(ctrl) CXD, CID, CD to start the first box. Type "Set the 
format" as the text for the first box, t hen rcTT-TO CED, CID, 
CD to end the first box. Now press (entefT ) followed by 



TRS-80 Microcomputer News, June 1983 



[ c T R H CD to center the box. Now repeat this process four 
more times and add the text "Define the type size" to the 
second box and "Define the upper left corner" to the third 
jox. Now add the text "Type in your text" to your fourth box, 
and finally add "Define the lower right corner" to the last box. 
Space down two lines and type a fCTRp GD, (3D, (3D. 
Now type the text "How to Create a Flow Chart" and change 
the size to 3 by typing fcTRTT ) CXD, GD, (3D, press 
Center) and again center the text. Go back and add lines 
between the boxes with the Line drawing command 
fCTRD QD, CD, n where n is the number of the line. 

Bet -the Formal 

Def I ne the Type 5 1 zej 

Define the upper l eft corne r] 

(Tupe I n uour Text! 
Beflne the loner" right corner! 



How io Create a Flow Chart 

Figure 2. 

You can see how easy it would be to alter this diagram 
with the editing capacities of Scripsit to produce endless 
variations, from an organizational chart to a seating diagram 
for a class. For some practice, take "Figure 1 " and modify it to 
produce a simple BASIC flowchart. Hint: you will need to use 
the external program function and the line command to 
produce flowcharting symbols. 

Scripsit has many features that will allow you to master- 
fully come up with graphics on the spur of the moment. You 
will want to create sample documents that you can move, 
copy, and edit. Use the comment feature of Scripsit to label 
sample graphic symbols such as trapezoids and circles. To 
make a quick change on a chart, use the global search and 
replace feature. If you have used Scripsit User Keys before, 
then you know how they can simplify your work. Use them to 
call up external program routines for often used graphics 

RNNUflL 5RLE5 REPORT 




ft!! 



■"fcFkj ; 



WIDGETS 



SPROCKETS 



CAMS 



symbols. Use the ASCI I convert feature of Scripsit to combine 
data from programs like VisiCalc with graphics. The possibili- 
ties are limitless. 

As you work with the Plotter Driver package, you will see 
that the most difficult thing to do is to line up different size 
characters on the page. To aid yourself in this, remember to 
use the dummy command and you may want to produce a 
sheet of different sized characters so that you know how 
many it takes to fill a line. This will help with centering and 
lining up text of varying sizes. 

For more information on producing graphics with your 
plotter driver, consult your multi-pen plotter manual, or check 
your local library and bookstore for books on graphics. JH 




UUUl 
tdMU 




• *'■*'<. 



Computer Customer Service 
Address and Phone Numbers 

8AM to 5PM Central Time 

Computer Customer Services 

400 Atrium, One Tandy Center 

Fort Worth, Texas 76102 

Model I/III/4 Business Group (817) 

Model 11/12/16 Business Group (817) 

Languages and Compilers (817) 

Color/Model 100/Pocket Computer Group (817) 
Hardware and Communications Group . . . (817) 

Educational Software (817) 

Games, Books, and New Products (817) 

Newsletter Subscription Problems (817) 



390-3939 
390-3935 
390-3946 
390-3944 
390-2140 
390-3302 
390-2133 
870-0407 



Figure 3. 



Educational Computer 
Consortium of Ohio 

ECCO, the Educational Computer consortium of Ohio, is 
now accepting proposals for presentation for its Third Annual 
Educational Computer Fair, to be held at Cleveland State 
University on Friday and Saturday, October 21 - 22, 1983. 
Classroom teachers and those with practical computer edu- 
cation experience are encouraged to submit proposals. We 
are searching for proposals in all content areas and grade 
levels, pre-school through college, for both beginning and 
advanced computer educators. 

To obtain the brief proposal form, send a request to: 

Ellen Richman, Coordinator 

ECCO 

4777 Farnhurst Road 

Cleveland, Ohio 44124 -& 



TRS-80 Microcomputer News, June 1983 



The DMP-2100-Revisited 



by Annette Zamberlin-Main 



Well, it looks like the clandestine days of 
hoarding the editor's DMP-2100 are at an end. 
(Please see the initial article on the DMP-2100 
in our March 1983 issue.) Nevertheless, before 
it went out of the office, I was able to become 
familiar with a few more of its aspects which I 
thought I would pass along to the readers. 

The response to the DMP-2100 has been 
very favorable. Let's face it, the DMP-2100 is 
just a great printer. Since its preview in Feb- 
ruary we have read and heard of a great many 
positive reactions from the customers about this 
new printer. Particularly interesting have been 
some of the comments, which have appeared on 
various CompuServe SIGs in the past month. 




If you haven't guessed it by now, the text 
of this article was printed from full size copy 
produced using the DMP-2100 and Model III 
SuperScripsit 1.1.0's proportional spacing capabi- 
lities. Isn't this just wonderful!! 

As a point of coffipar ison, this 
is a proportional print sample f r om 
a DMP-2 00. Proportional characters 
add a quality loo i = t o w ord process- 
ing documents. 

CORRESPONDENCE QUALITY 

I am still quite taken with the correspon- 
dence quality font of the DMP-2100. I referred 
to it in the March article, but since then have 
learned a little more about what goes into mak- 
ing each element of that great looking font of 
type and wish to share that information. 



The correspondence quality font is available 
in both 10 and 12 CPI (Characters Per Inch). A 
comparison has been set up here between two 
members in the DMP series: the DMP-200 Corre- 
spondence Quality and the DMP-2100 Correspon- 
dence Quality. Each are at 10 CPI. 

T his is a n e ■■< ample of the Cor- 
respondence Quality font from a 
DMP -200. It is produced on a 15x8 
ma t r i >; at 10 CP 1 . 

The DMP-2 00 is a high-density 
dot -ma t r i >? Printer which can per- 
form a variety of different print- 
ing operations. For instance, it 

following types of 



the 



can print 

characters: 
Standard 
Compr essed 
Condensed 
Proportional 
Cor r e s p o n d e n c e 
Graphics 



This is an example of the Cor- 
respondence Quality font from a 
DMP-2100. It is produced on a 36x24 
ma t r ix at 10 CPI. 

The DMP-2100 is a high density 
dot-matrix printer which can per- 
form a variety of different print- 
ing operations. For instance, it 
can print the following types of 
char ac t er s : 

Standard 

Condensed 

Correspondence 

Propor t ional 

Graphi cs 

As its name implies, a dot-matrix print head 
forms its characters through a system of dots in 
rows and columns. Because of the increased num- 
ber of rows and columns in the DMP-2100's ma- 
trix, each character's image is more defined than 
that of a character from the DMP-200 set. 

The 36x24 dot matrix characters produced 
using the 24-wire print head on the DMP-2100 



TRS-80 Microcomputer News, June 1983 



truly rival the letter quality printing capabilities 
of the Daisy Wheel printers. 

GRAPHICS 

Since this is our graphics issue, it would be 
appropriate here to investigate the graphics ca- 
pabilities of the DMP-2100. 

In the Graphics Mode of the DMP-2100, you 
no longer have pre-defined characters at your 
disposal. The responsibility for the positioning 
and action of the print head lies with the user. 

The DMP-2100 prints two levels of graphics 
- a 7 bit, low resolution graphics level and a 
high resolution graphics level of printing. (In the 
March article, on page 5, two print samples ap- 
peared: one labeled "Low Resolution graphics" 
and other "High Resolution graphics." Both are 
actually examples of low resolution graphics. 
Sorry for the confusion.) 

The regular, low resolution mode is the stan- 
dard Graphics Mode that other Radio Shack prin- 
ters such as the DMP-200 are capable of 
printing. 

The high resolution mode is a special 
Graphics Mode that is unique to the DMP-2100. 
This mode takes full advantage of the printer's 
24-wire print head. 

For instance, a DMP-200's regular Graphics 
Mode creates a dot every time a wire in the 
print head strikes the ribbon. However, a 
DMP-200's print wires are much larger than the 
print wires in a DMP-2100's print head. For the 
DMP-2100 to create a dot that is equal in size 
to a DMP-200's dot, the print wires must strike 
the ribbon nine times. This creates a 3x3 dot- 
matrix that is equal to the single dot on the 
DMP-200. 

To differentiate between regular and high 
resolution dots, we'll call the image created by a 
single DMP-2100 print wire striking the ribbon a 
"point." Nine points printed in a 3x3 matrix will 
create a "dot" which is the same size as the 
DMP-200 "dot." 

There are 816 addressable dot-columns 
across the 13.2x11 inch sheet of paper and 7 "up 
and down" addressable dots (dot rows). Which 
means, when all is said and done, that you can 
specify up to 5,712 individual dots (7x816=5,712) 
in each print row, in the low resolution mode. 

In high resolution graphics there are 2,448 
addressable point-columns "across the paper." And 
another 24 "up and down" addressable points 
(point rows). This means that there is a grand 
total of 58,752 (24x2448=58,752) individual points 
which you can specify in a single line running 
the width of the 13.2x11 inch sheet of paper. 



Now just think about that for awhile. With 
the DMP-2100 you can specify up to 58,752 indi- 
vidual points per line in high resolution graphics. 
Or at 60 lines per page, that's 3,525,120 
(60x58,752) addressable points on one page. 

The reason the DMP-2100 has this high reso- 
lution capability is to support the high resolution 
characters such as the correspondence quality 
font we examined in an earlier section. It's 
going to take a tremendous amount of software 
support to utilize the DMP-2100's high resolution 
graphics. Right now, there is no commercially 
available software that will do this. 

If you are into high resolution graphics and 
are writing customized software, the DMP-2100 
may just be the machine for you! 



3.2% 



High-Resolution 
Graphics 




39.1% 



20.7% 



ONCE MORE WITH THE PARTICULARS 

The DMP-2100 (Cat. No. 26-1256), is avail- 
able for $1995.00 (suggested retail price) at 
Radio Shack Computer Centers and participating 
Radio Shack stores. 

Radio Shack also offers optional equipment 
for the DMP-2100. A Bi-Directional Tractor 
(Cat. No. 26-1441) for use with fanfold paper, 
labels, and multi-part forms, is available sepa- 
rately for $169.95 (suggested retail price). 

A single sheet of paper can be manually fed 
into the printer. For larger single sheet jobs a 
Sheet Feeder (Cat. No. 26-1440) for automatic 
paper insertion and stacking is recommended. The 
Sheet Feeder is available separately for $995.00 
(suggested retail price) at Radio Shack Computer 
Centers and participating Radio Shack stores and 
dealers. ^ 



TRS-80 Microcomputer News, June 1983 



Profile 




me With Profile III + 



The small Computer Company 

P.O. Box 2910 

Fort Worth, TX 76113-2910 

By Ivan Sygoda, Director, Pentacle 

Profile III+ section copyright 1983, Ivan Sygoda. All rights reserved. 



Since most of these Profile articles have been directed 
toward business, I thought it would be a good time to change 
gears and illustrate how the program can help you enjoy 
leisure activities. 

THE STAMP OF APPROVAL 

Tens of millions of people collect things: tangible things 
like matchbook covers and diamonds, intangible things like 
bird sightings and ham radio contacts. Profile III+ is the 
perfect computer program to organize and collate the facts 
and notations relating to whatever it is you collect. 

As an example, we'll set up and use a stamp catalogue 
file that includes the kinds of information that any collection 
involves— description of items, date and place of acquisition, 
price, condition, current value, etc. This exercise will also 
serve as a refresher course on defining files, screens, reports, 
labels, math formulas, user indexes and user menus. We'll 
take advantage of a Profile III+ capability we haven't used 
before in these articles— that of automatically extending a 
one-segment file over several disks as your file (and collec- 
tion) grows. 

COLLECTING YOUR THOUGHTS 

As you'll see, Profile III + is quite easy to use. The hard 
part comes before you sit down in front of the screen. You 
must collect your thoughts before anything else. First, think 
about the information you want to have on tap about your 
collection. Second, consider the most efficient means of en- 
tering and storing this information. Third, relax. There's no 
reason to be brutally efficient about any of this. After all, it's 
your hobby. 

In my data base, which I named "STAMPCAT," I wanted 
to describe the configuration of each item— every type of 
stamp can be collected in a number of configurations such as 
single stamps, blocks of four, plate number blocks, first day 
covers, coil pairs and coil line pairs, to name some of the 
more standard ones. I wanted it to describe the condition of 
each item in considerable detail, since philatelists are some- 
what fanatical about this aspect of collecting and since condi- 
tion has a great effect on price and value. 

I wanted my program to keep tabs on the stamp "mar- 
ketplace", since stamps can also be an investment. Finally, I 
wanted to be able to sort my stamps according to the stan- 
dard cataloguing system copyrighted by the Scott Publishing 
Company. 

NUMBER, PLEASE 

This last point proved the trickiest to deal with because of 
the way computers sort lists. Scott catalogue numbers are 



alphanumeric. Regular postal issues begin with number 1 
(the first five-cent U.S. stamp of 1847). Airmail stamps begin 
with C1 . Paid reply postal cards begin with UY1 , and so on. 
The problem, however, is the suffixes. Over the years, as 
research unearthed previously unknown printing varieties, 
upper-case letters were added to the catalogue numbers to 
wedge these new items into the numbering system. For 
instance, there are some varieties of two-cent stamps from 
1918-20 numbered 528, 528A and 528B. But lower-case 
letters are also used to indicate printing peculiarities. So 528c 
is a "double impression" of two-cent type Va, 528A is a 
normal impression of two-cent type VI, and 528Ad is a dou- 
ble impression of type VI. (Don't laugh— you may be just as 
maniacal about subspecies of orioles.) The American Stan- 
dard Code for Information Interchange (ASCII) sort utility 
used by most microcomputers will not order these catalogue 
numbers the way the Scott catalogue does. The catalogue 
order of these stamps is: 528, 528c, 528A, 528Ad, 528B, 
529, but the ASCII sort order is: 528, 528A, 528Ad, 528B, 
528c, 529. 

The solution is to use two adjacent fields for the cata- 
logue number. The first field (6 bytes) contains the main 
catalogue number, including any upper-case letter suffix. The 
second and following field (1 byte) contains any lower-case 
suffix: 

Catalogue no Suffix 

528 

528 c 

528A 

528A d 

528B 

529 
When I want to sort my records by catalogue number, I 
sort on field 1 , but indicate a sort length one greater than my 
field length. This way, any printing varieties pertaining to a 
main catalogue entry will be listed properly under it. 

This procedure also circumvents a feature of Profile III + 
that is a convenience in most cases, but which causes prob- 
lems in this application: the program ignores upper/lower- 
case differences when searching for matches. In the Scott 
catalogue system, 528b and 528B are entirely different 
stamps. Placing lower-case suffixes in a separate field en- 
ables Profile to distinguish between them. 

THE FIELDS DEFINED 

Figures 1 A-1C list the fields I defined for STAMPCAT. You 
may notice that I didn't include a field for country, since all my 
stamps are U.S. If you have an international collection, you'll 
want to list the country first. When you sort by country, indi- 



TRS-80 Microcomputer News, June 1983 



cate a field length seven greater than the country field length: 
country + catalogue number (6) + suffix (1). The stamps in 
«ach country will be listed in catalogue order. 




Figure 1A. 



E F I. N E FILES 



Field Nurnt 
11 


:>er 


- Fie 
Price 


Id 


He ad ins - 


Field 


Lennh 

7 


12 




Mint/Used 








1 


13 




Corid:Recto 








10 


1/1 




CondiVerso 








10 


15 




Scott ual 








7 


16 




MKt. ual 








7 


17 




Source 








3 


18 




+/-I 








5 


19 




Last update 








8 


20 




Marker 








1 



3 ress H -To Hardcopy i ENTER -To Continue H 



Figure 1B. 

My two-character "Item ID" identifies the configuration of 
the item and uses the abbreviations found in many stamp 
auction catalogues— "BL" for a block of stamps, "PB" for a 
plate number block, "CS" for a coil strip and so forth. Like the 
Eskimos with their reputed seventeen names for kinds of 
snow, you can establish as many distinctions as you like, as 
long as you are consistent in using them. If a plate block is 
"PB" one day and "PL" the next, Profile will never be able to 
tell you what you want to know when you do an inquiry. 

I've allotted two characters to indicate the number of 
stamps in each item because I have blocks as large as 25 
stamps. Collectors love to count the number of stamps in their 
collection. With Profile, I can go one better. I can automatically 
multiply the number of stamps by their face value to get a 
grand total. The formula to enter into the math table is: 
21 =4*6 (the face value is equal to the number of stamps 
multiplied by the denomination). 

Five spaces are allotted for the stamps' denomination, 
because the system' has to cope with values from the .005 
Presidential half-cent of 1938 to the $5.00 postage of the 




Figure 1C. 

$10,000 RD185C stock transfer stamp. (A special notice to 
robbers: I do not have the latter stamp, so stay away.) 

I chose to use a four-digit year instead of the eight- 
character YY/MM/DD because many interesting stamps are 
pre-1900. Also, the exact date of issue is unknown for many 
early stamps. Field 9 (Color/Variety) is the place I enter notes 
on what makes the stamp distinct from others of its type. 
Typical entries might refer to color variety, perforation count, 
printing process or engraving peculiarity. Under "place of 
purchase" I enter my three-character code for the dealer, 
auction house or other source. I enjoy designing codes, but if 
code designing doesn't thrill you, too, allot additional space 
for such alphanumeric entries. But before you do, I should 
mention that almost all the information I'm storing about each 
item in my collection fits on one 1 32-column report line, so to 
me it's worth the extra effort. 

Since stamps have a front (recto) and a back (verso), I've 
allowed ten characters to describe the condition of each. This 
may not seem like a lot of space, but there are many standard 
abbreviations one can use. For instance, to grade the ap- 
pearance of the back of stamps, you have "og" for original 
gum and "Ih" light hinge mark, among others. 

Field 15 contains the current Scott catalogue value, 
which can be useful in determining the general value of a 
collection for insurance and tax purposes. Many collectors 
receive sales and auction catalogues along with lists of prices 
realized. It's the philatelist's equivalent to reading the stock 
market quotes. I can record the latest prices for items resem- 
bling my own in field 16. 

And since everyone likes to pat themselves on the back 
for buying low, selling high and for being generally shrewder 
than the next guy, I can let Profile's math package tell me how 
many times my stamps have appreciated in value. To do this, 
I subtract the original purchase from the current market 
value. Then I divide that result by the original purchase price 
and multiply by 1 00 to yield a percentage. The math formula 
is: 

18 = 16-11/11 *"100"l 

The "I" placed in the body of the formula forces Profile to 
express the result as an integer. 

Finally, the "marker" field is the one-character electronic 
"dog-ear" through which I can make special notations. For 
example, suppose I want to sell some stamps. After I enter an 



TRS-80 Microcomputer News, June 1983 



"S" in the marker field, I can easily print a listing of those 
stamps I want to sell. I can also use this feature to make an up- 
to-date "want list." I enter the stamps I'm interested in ac- 
quiring, describe the desired condition, enter a "W" in the 
marker field, and print out a list for my local stamp merchant. 
It's impressive— he or she will know I mean business, 

GETTING PERSONAL 

Almost nothing is more personal than a hobby. I don't 
pretend for an instant that STAMPCAT will suit most other 
stamp collectors. Some don't care what the back of a stamp 
looks like. Others collect types of cancellations for which I ' ve 
made no provision. Still others sell stamps as often as they 
buy them, and will want to record more details about these 
transactions. With Profile, you can have it your way. Still, 
whatever you collect, if there are catalogues and sales lists 
published, examine them for ideas about setting up your own 
data base— ways of organizing information, standard abbre- 
viations and so forth. 

SCREENING YOUR COLLECTION 




Scott No,; *1 / Suffix; *2 Year of issue; *5 / 
Series; *7 / Denomination; »B / 
Item ID code; *3/ Number stamps in item; #4/ Face value ;$!2i / 
Color/Variety; *8 / Mint/Used 7 ; *12, ,«=mint t 0,3, 
Condition/Recto; *13 / ,x=unusedi 11. s. 

Condition/Verso: *14 I ,u=used 

Dealer; *9 / Purchase price: .11 / Purchase date; )10 / 
Current Scott catalogue value: .15 / 

Current estimated market value:. 16 / Source: *17/ 

Chanse in value over purchase price: !18 II .Marker: *2 



Screens: . 1 .Data Entry 



Hi 



Figure 2A. 




Here are two of a hundred possible screen formats for 
entering and reviewing my STAM PCAT data fields, Figure 2A 
shows the way STAMPCAT/PM1 (Screen format no. 1, my 



mM®sm&e&:&lggm 



United States Postage Stamps 




Record updated B3/01/3C 



Scott No.: 332 , Suffix: , Year of issue: 190B, 
Series: Mash. -Franklin . Denomination: ,02. 
Item ID code: S . Number stamps in item: 1, Face value:* ,02, 
Color/Varietv: FP P. 12. dbl, Mint/Used 7 : *, ,,*=niint> o.J, 
Condition/Recto: xfi sm cr , ,x=unusedi n.s'. 

Condition/Verso: osi nh , ,u=used 

Dealer: ZEN, Purchase price: 6.00. Purchase date: 78/11/16, 
Current Scott catalogue value: 12,00, 

Current estimated market value: 15,00, Source: HAR 

ChanSe in value over purchase price: 150,'/, .Marker: U, 




data entry screen) looks when I format it from the Creation 
menu. I use this screen to enter data. Figure 2B shows the 
way it looks during typical use. I often reserve a screen for the 
original entry of information into a record. 

Once the data is in the file, the data entry prompts 
become superfluous, and so I eliminate them from the 
screens I work with afterwards. Figures 3A and B show such 
a working screen, STAMPCAT/PM2, which I use to enter 
and update marketplace information. I use "!" to protect the 
information in most of the fields on my screen format no. 2 
(figure 3A). 



illitjstiiH 



Scott No.: !1 /!2 Year of issue: !5 / 
Series: !7 / Denomination: !6 / 

DESCRIPTION OF ITEM PURCHASE INFORMATION. 

. ID: !3/i4/ Mint/Used? !!2 . , Dealer code: !9 / 




Marker:*20 Face value;$!21 
Screens: 1 Data Entry .2, 




Color/Varietv: !f 

Condition 

---Recto--- ---Oerso- 

'13 / !14 



/ 



Purchase price: $!11 
. Purchase date: !10 

. Current Scott value: $.15 
Current market value $,1B 
/ Source: *17/ Change*/- !18 

Computation 3 Codes 



55^3 




m^^^i^f^^ ' v »\.' ' - ^ »&* r 3 «/« 1 



Figure 3A. 

Profile III + lets you access the complete collection of 
Model III special characters to make attractive screen lay- 
outs. It's easy. At any time during screen creation, press 
(SH'iT D and C@j together when the cursor is positioned 
where you want a special character to appear on the screen. 
The cursor jumps to the two bottom lines, where the special 
characters are arrayed. Position the cursor over the desired 
character and press CEnXEBD. Presto, you're an artist, 
Experiment. 

Here's a trick: If you're worried about forgetting the 
codes and abbreviations you make a part of your application, 
list them all on a screen you can call at the touch of a button. 






United States Postage Stamps 



Scott No.: 332 . , Year of issue: 1908, 
Series; Nash, -Franklin , Denomination: ,02, 




Record updated 83/01/30 



DESCRIPTION OF ITEM 

, ID: S , 1, Mint/Used' *, 
, Color/Variety;FP P,12, dbl,, 

Condition 

. ---Recto Uerso--- 

sm cr , oil nh 



PURCHASE INF0RMATI 

, Dealer code: ZEN, 

, Purchase price: $ 6,00 

, Purchase date: 78/11/16 

Current Scott value: t 12,00, 

Current market value $ 15,00, 

Marker:U, Face value:* ,02, Source: HAR, ChanSe+/- 150,'/, 

Screens: 1 Data Entry ,2, Computation 3 Codes 

* 1 D-Delete» H-Hardcpy. U-Updte, X-End. ENTER-Next 







Figure 3B. 



10 



TRS-80 Microcomputer News, June 1983 



There's one catch. If you list codes only, you'll get an error 
message stating that there are no fields in your format. 
So stick a field in the bottom corner of the screen, and Profile 
A/ill keep its mouth shut. I used field 2 since it's short, often 



void and can be formatted with just one digit. Figure 4A 
shows the way STAMPCAT/PM3 (Screen 3) looks when for- 
matted. Figure 4B shows the way it looks during use. The 
"phantom" field is on the bottom right. 





Figure 4A. 

REPORTS AND LABELS 

1 2 3 



Figure 4B. 



6 



-0- 



* 

#*# 7 
-+*---0 +- 



<? 







3 



-0- 



-+- 



■+- 



-+- 



-0- 



-+- 



-0- 



•+- 



■t- — u- — +-— D- 

T.I.T.LE.-.L.I.N.E.S 

UNITED STATES POSTAGE STAMPS 

Ivan Sygoda, New York NY 

Date; / Page # 

H.E.A.O.I.N.G.-.LI.N.E.S 

Sort criterion:'? ===Descr ipt ion==== Item Face ========Condit ion======== Purchase Information ======Current value====== 

Scott no. ====Series===== Oenom =Color/Var.= ID 8 value */u ==Recto=== ==Verso=== OLR ==Date== =Price= =Scott= Market* Scr +/-X 

F.I.E.L.0.--.L.I.N.E.S 

*1 /»z *7 /*6 /*8 /*3/=4 =21 /*12*13 /*14 M /MO /=li / =15 / =16 /*17/*18 / 

Figure 5A, 

UNITED STATES POSTAGE STAMPS 
Ivan Sygoda, New York NY 
Date: Q5/02/83 Page 1 



Sort criterium: 

Scott no. ====Ser ies== : 



===0escription==== Item Face ========Condition===== : 

=== Denom =Color/Var.= ID ft value K/u ==Recto=== ==Verso= 



Purchase Information ======Current vaiue======= 

OLR ==Date== =Price= =Scott= Market= Src +/-X 



332 


Uash . -Frank 1 in 


.02 FP P. 12, dbl S 


1 


.02 * 


xf, sm cr 


og, nh 


ZEN 78/11/16 


6.00 


7.50 


32.00 HAR 


433 


334 


Uash.-Frankl in 


.04 FP, P. 12 dbl S 


1 


.04 * 


xf gem 


og, nh 


ZEN 78/11/16 


75.00 


27.50 


85.00 HAR 


13 


335 


Uash . -Frank 1 in 


.05 FP, P. 12 dbl S 


1 


.05 * 


vf-xf 


vlh 


ZEN 78/11/16 


65.00 


40.00 


105.00 HAR 


62 


336 


Wash .-Frank 1 in 


.06 FP, P. 12 dbl S 


1 


.06 x 


f-vf 


nh 


SAM 74/06/05 


8.00 


50.00 


120.00 HAR 


1400 



,17 



154.! 



125.00 342.1 



RECORDS SELECTED 4 
Figure 5B. 

Figure 5A shows report format 1 (STAMPCAT/PR1) and 
figure 5B shows a sample print-out. Figures 6A and B show 
STAMPCAT/PR2, which I use as a want list. Figure 7A shows 



a possible label format (STAMPCAT/LB1), and 7B illustrates 
how it turns out using my printer's proportional-space corre- 
spondence-quality font. The labels are great, especially if you 



TRS-80 Microcomputer News, June 1983 



11 



1 



+- 



-0- 



* 

■kick y 



8 



_+ o + + + + +* + 

. T.I.T.L.E.-.L.I.N.E.S . 

UNITED STATES POSTAGE STAMPS: WANT LIST 
Ivan Sygoda, New York, NY 
/ page // / 

H.E.A.D.I.N.G.-.L.I.N.E.S 

==SC0TT== ==============DESCRIPTION=============== =========C0NDITI0N========= 

=Cat.no.= = = ==Series===== Denom Color/Var. ID // */u ===Recto=>== ===Verso=== 

F.I.E.L.D.-.L.I.N.E.S 

*1 /*2 *7 /*6 /*8 /*3/*4 *12 *13 / *14 / 

Figure 6A. 

UNITED STATES POSTAGE STAMPS: WANT LIST 
Ivan Sygoda, New York, NY 
05/02/83 page 1 



==SC0TT== 




=Cat .no . = 


====Series==== 


332 


Wash . -Frankl in 


334 


Wash . -Frankl in 


335 


Wash. -Franklin 


336 


Wash . -Frankl in 



DESCRIPTION======== 

= Denom Color/Var. 



ID // 



02 FP P. 12, dbl S 

04 FP, P. 12 dbl S 

05 FP, P. 12 dbl S 

06 FP, P. 12 dbl S 



7u = 



====C0NDITI0N = = = = = = = =- = 

= : =Recto== !s ===Verso== B 



1 


* 


xf , sm 


ci- 


og. 


nh 


1 


* 


xf gem 




°g» 


nh 


1 


k 


vf-xf 




vlh 




1 


A 


f-vf 




nh 





RECORDS SELECTED 
Figure 6B. 



like to make your own album instead of placing your stamps 
in someone else's squares. Note: If you want to use propor- 
tional spacing, you have to format "one-wide" labels be- 
cause the left margin of the right hand columns of labels will 
be ragged. Print half, then turn the sheet of labels upside 
down and feed them in this way. 




Figure 7A. 



Scott no, 332 Year of issue*. 1908 

Series? Wasfn-Franklin Var? FP F»12, dbl 
Dealer? ZEN Date of purchase? 78/11/16 
ConoVRecto? xf, sm or Verso? og, nh 



Scott no* 334 Year of issue? 1908 

Series? Wasfu-Franklin Var? FP, P42 dbl 
Dealer? ZEN Date of purchase? 78/11/16 
Cond ♦/Recto? xf gem Verso? og, nh 



Scott no* 335 Year of issue? 1908 

Series? Wash*-Franklin Var? FP, P.12 dbl 
Dealer? ZEN Date of purchase? 78/1 1/16 
Cond*/Recto? vf-xf Verso? vlh 



Scott no, 336 Year of issue? 1908 

Series? Wash*-Franklin Var? FP, F.12 dbl 
Dealer? SAM Date of purchase? 74/06/05 
Cond,/Recto? f-vf Verso? nh 

Figure 7B. 



12 



TRS-80 Microcomputer News, June 1983 



USING AN INDEX 

When you first enter data in your file, accessing it is 
reasonably quick and efficient. You probably don't have 
nany records. The ones you do have are most likely in the 
order of your original manual filing system. You have only a 
few (if any) deletions. All this helps to facilitate the speed with 
which Profile searches through your records to find those you 
want. Calling a record by its record number is the fastest way 
to get to it, but unless you have an amazing memory, you 
probably don't remember which number goes with which 
item in your file. You could always print a report that includes 
the record number of each of your records, using the record 
numbers as a "home-brew" cataloguing system for your 
collection. But then you would need to keep that report handy 
all the time if you want Profile to find a particular item in your 
file as quickly as possible. Since this is rather inconvenient, 
Profile lets you set up an index to speed things up. If you have 
a ready-made cataloguing system, like that of the Scott cata- 
logue for stamp collectors, you can set up an index based on 
it, which will be a big help in finding items in your file. 

Whenever I want to see one of my stamps, I enter its Scott 
catalogue number, not its record number. 

Here's a schematic illustration of how an index works. My 
records might originally have been entered in the following 
(random) order: 

Rec.no Cat.no Suffix 

1 C15 

2 1619 a 

3 100A 

4 C2 

5 20 a 

I need to put this file in catalogue number order, so I sort 
by field 1 (length = 7). Profile III + constructs an inquiry index 
called STAMPCAT/IX1 which looks something like this: 
Cat.no Suffix Rec. No. 

20 a 5 

100A 3 

619 a 2 

C2 4 

C15 1 

This index file takes up very little room on the disk. Each 
record in it is only 1 bytes long (the sort field length of 7 plus 
3 bytes for housekeeping, i.e., the "pointer") as opposed to 
the 1 23 bytes for the full record. Since the index is in the order 
I want to access my files, it finds records fast. And it's there 
waiting for me whenever I turn on the system and enter 
STAMPCAT. However, there's one catch: Whenever I add or 
delete records, I have to rebuild this index so that it will 
incorporate the changes. As we'll see below, Profile can be 
set up to accomplish this automatically. 

BUILDING AN INDEX 

Build Index is selection 2 on the Profile Runtime menu. It 
only takes a few keystrokes to build an index. Make a note of 
each one, because you'll need to enter them in the BUILD file 
which automates the procedure. Following are the prompts I 
encounter and the responses I should enter to build my 
catalogue number index: 

PROMPT RESPONSE 



Enter Length For Sorting or 
Press ENTER for Length of Field 
Capacity 3756 Records 
Enter Selection Field Number or 
Press ENTER to Select All Records 



Enter File Name 

Enter Field Number to Sort 



STAMPCAT1 
1 



(~E N TTR j 

The program then tells me how many records 
were selected and returns me to the Runtime menu. When I 
examine the DIRectory, I find that Profile has now created 
STAMPCAT/IX1 with a "Logical Record Length" of 10. Also, 
there is a new prompt for Inquire, Update, Add. Passing over 
"Enter Record Number" by pressing fE n t e fT j, I find: "In- 
dex by: Cat#" with the cursor blinking for a response. "Cat#" 
is the heading I used for field 1 when I defined files. Pressing 
fElTTERl again calls up the sort and select options. There 
are two ways to answer the index prompt. I can enter a 
specific catalogue number, in which case the program 
searches for it in the new index and then displays that record 
on the screen. Or I can enter the "wild card" symbol, 
This brings the first or lowest catalogue number to the screen. 
(Technically, Profile fetches the first "logical" record as op- 
posed to the first "physical" record.) I can then use the up 
and down arrows to examine my records in catalogue num- 
ber order. 

AUTOMATION 

Since the index must be rebuilt every time you add or 
delete records, it's convenient to do this with just one key- 
stroke from a user menu. The process involves BUILDing a 
DO file that then becomes a menu choice. From TRSDOS 
Ready, I type "BUILD REBUILD," since I decided to call my 
DO file "REBUILD." In response to the prompt, I enter "EFC8 
(STAMPCAT, 1, Rebuild CatalogueNumber Index)." 

"EFC8/CMD" is the Profile Runtime program which 
builds the index, "STAMPCAT" is the file name. "1" refers to a 
screen, and, though it's irrelevant here, it's important for other- 
operations, and so it is part of the format. "Rebuild Catalog 
Number appears on the screen when Profile executes 
REBUILD. TRSDOS again prompts for an entry, so I enter 
"1," the response to "Field Number to Sort By." The next 
entry is "7," the desired sort field length. The final entry is 
simply QEntjOD, because I wish to "Select All Records." I 
press (breakI to complete the process. When I now exam- 
ine the DIRectory, I find REBUILD/BLD and notice that it 
occupies one gran. To test the new BUILD file, I enter "DO 
REBUILD" at TRSDOS Ready. 

USER FRIENDLIER 

The final touch is the creation of a customized user 
menu. With a little bit of planning, you can partially or com- 
pletely automate the procedures you use most often. I call my 
menu STAMPCAT, which the directory lists as STAMPCAT/ 
CMD. Figure 8 shows how my menu creation screen looks 
when I finish defining my choices. Selection 7 is the BUILD file 
we just created to rebuild my catalogue number index. Selec- 
tion 2 takes me right up to the "Enter Record Number" 
prompt in Inquire, Update, Add. Selection 1 calls 
ADDSTAMP/BLD, which displays the first blank record on 
the screen, ready to accept a new stamp. 

ALLSCAN/BLD calls screen 2 and enters the wild card 
symbol " = " in answer to the Cat# prompt. Finally, selection 8 
takes me back to the Profile Runtime menu (RM). (Keep in 



TRS-80 Microcomputer News, June 1983 



13 



I* Add a stamp to the collection 
DO ADDSTAMP 

2. See a particular stamp 

EFC9 (STAMPCAT,2,See a particular stamp) 

3. Scan the entire collection 
DO ALLSCAN 

i> Print collection report 

EFC8 AISTAMPCftTil. Print collection report) 

5. Print want list 

EFC8 A(STAHPCATf2 .Print want list) 

G. Print album labels 

EFCB 6ISTAMPCAT.1, Print album labels) 

7. Rebuild catalogue number index 
DO REBUILD 

8. Call Profile III+ Runtime menu 
RH 



Figure 8. 

mind that indexing adds another ( enter) to a "Scan Re- 
cords" or "Add Records" entry into the file.) 

IT JUST GROWS, LIKE TOPSY 

I said at the beginning that STAMPCAT takes advantage 
of a special Profile capability. When my collection grows to 
the point that this one-segment-only file completely fills the 
available space on my Runtime diskette, the segment auto- 
matically jumps to the formatted data diskette I have waiting 
for it in the next drive. And when that drive is filled, it extends 
to drive 2, and then, finally, drive 3. STAMPCAT/KX1 , KX2, 
and KX3 are the results of this utility. Rather neat, eh? All I 
need is enough stamps. Happy collecting! 

COMING ATTRACTIONS 

Next month we'll discuss how to access your Profile data 
files from BASIC. We've received many inquiries on that 
subject. In future issues we'll introduce the fantastic Hard 
Disk version of Profile III + (26-1 593), which should be avail- 
able about the time you read this. This enhanced Profile 
incorporates the advanced sort and select features Model II 
users know as Prosort. Then we'll examine the ways your 
Profile data bases can interface with Scripsit and VisiCalc. Let 
us know if there's anything else you'd like to read about. If you 
use Profile in novel applications or would like to share tricks 
and techniques you may have discovered, please write and 
describe them to us. You, too, can be in print. 

PROFILE Editor's Note: This is Mr. Sygoda's eighth arti- 
cle in a series of 'how-to ' Profile III + articles. Other articles in 
the series will be published over the next few issues in this 
column. We hope that you enjoy this feature, and we look 
forward to your comments and questions on Profile III + . 

Pentacle is a New York City-based non-profit service 
organization specializing in administrative services for per- 
forming art groups. ^H 




High Motivation 
from Radio Sha< 



eaciing 



Radio Shack's High Motivation Reading Series pack- 
ages, available in Model III and Model I versions, help build 
reading skills at the critical fourth through sixth grade reading 
levels. The series is designed for classroom use as a supple- 
ment to the regular reading curriculum. The motivational 
design of each package makes HMRS ideal for enrichment 
and/or remedial use with students at a wide range of grade 
levels. 

Each HMRS package contains four illustrated-format 
reading books, one read-along audio cassette tape, and a 
diskette with reading comprehension activities to be com- 
pleted at the computer. Additional activities are in the teach- 
er's manual for each package. Model III versions of HMRS 
also include repeatable spelling and vocabulary exercises on 
the activities diskette. To use the HMRS packages, you also 
need the Model III or Model I version of TRS-80 
MicroPILOT™ (Cat. No. 26-2718 or 26-2205). 

HMRS packages currently available for the TRS-80 
Model III 32K disk system are: The Hound of the Basker- 
villes, Dracula, Moby Dick, The Beatles, Charles Lindbergh/ 
Amelia Earhart (the Lindbergh/Earhart package contains two 
activities diskettes), and 20,000 Leagues Under the Sea. The 
same titles are available for a 32K Model II disk system with 
lower-case driver, although quantities available may be lim- 
ited. Dracula and Moby Dick are currently available for the 
Model I 32K disk system with lower-case driver. 




The reading book in each package condenses the clas- 
sic story (or the biography), retelling it in words appropriate to 
the reading level. The illustrated format of the books helps 
make the stories accessible, and makes the reading process 
less threatening and more enjoyable. HMRS helps students 
build reading skills while gaining exposure to stories they 



14 



TRS-80 Microcomputer News, June 1983 



might not otherwise read, or might not read until they were 
much older. Once they have enjoyed the HMRS version of a 
book like Moby Dick or The Hound of the Baskervilles, stu- 
dents may well want to tackle the original! 

The exercises on diskette vary from title to title, but let's 
take a look at a typical set from Moby Dick. Both the Model III 
and Model I versions of Moby Dick have three sets of reading 
comprehension exercises: "Words to Know and Use," "How 
Well Did You Read?," and "Choose the Proper Meaning." 
"Words to Know and Use" presents a list of words and 
defines the words as they are used in the story. Then, the 
student is given a series of sentences and is asked to fill in the 
blank with the correct word. 




When the student responds correctly to an HMRS exer- 
cise, he or she sees a positive feedback message and then 
gets another sentence. For an incorrect response, the stu- 
dent is prompted to try again. A new sentence isn't presented 
until the student enters the correct response. At the end of 
each program, the student's score on the activity is dis- 
played. (An optional HMRS Student Records System is also 
available separately in Model III and Model I versions for 
teachers who want to save HMRS student scores on disk- 
ette.) "How Well Did You Read?" tests the student's reading 
comprehension and recall of details by asking questions like 
this; 

















:Siiii«^i^S3^N^^3*iffl 



"Choosing the Proper Meaning" asks the student to tell 
what meaning of a word is used in each of a set of sentences. 
The exercise below is from a sequence that presents several 
sentences using "SOUND" and requires the student to 
choose a different definition of "SOUND" for each sentence. 






mm 






kH 



The Model III version of Moby Dick also has Spelling and 
Vocabulary exercises that emphasize words used in the 
story. Spelling exercises display a sentence, highlight a word 
in the sentence, and then make the highlighted word disap- 
pear. To work the exercise, the student types the correct 
spelling of the word that disappeared. In the Vocabulary 
exercises, a word and a list of definition choices are displayed 
on the screen. The student then types the letter that identifies 
the correct definition. 




IP 

Bra* 






'sSisi 



m% 



»ii 



mm 



m 









HMRS programs can be used with students at a wide 
variety of grade levels and skill levels. Students who are 
reading below grade level should find the illustrated format of 
the readers and the dramatic presentation of the story on 
audio tape to be aids in increasing comprehension and vo- 
cabulary skills. The series may provide younger students 
reading above grade level with an added challenge, and may 

(Continued on page 17) 



TRS-80 Microcomputer News, June 1983 



15 



Color Computer 



The New TRS-80 Mi 
Computer 



Color 



by Linda Miller 



The TRS-80 Micro Color Computer Model MC-10 offers 
graphics capability and BASIC programming in a compact, 
inexpensive unit. Some outstanding features of the MC-10 
are: 

• A keyboard with keys that move when pressed. This is 
not a membrane keyboard. 

• A built-in RS-232 serial port for communications or for 
connecting other serial devices such as serial printers 
or plotters. 

• Keyword input using two simple keystrokes. 

• Low resolution graphics in a 64x32 matrix. 

• Sound. Create your own music or sound effects. 

• Microsoft Color BASIC 

The MC-10 is approximately 8V2" wide by 7" deep by 
2" high. It has 48 keys and can be connected to a TV 
(preferably color) via its own antenna switch. A power supply 
and a well written, easy to understand manual are also sup- 
plied with the Micro Color Computer. The suggested retail 
price for the computer is $1 19.95. 

THE KEYBOARD 

The MC-10 has a "QWERTY" keyboard with keys that 
move (travel) when pressed. Above thirty-seven of the keys 
are familiar BASIC words and functions. Many keys have two 
characters on the key cap much like a typewriter keyboard. 
Graphic characters are located on the alphabetic keys Q, W, 
E, R, T, Y, A, S, D, F, G, Z, X, C, or V. The second characters 
which appear above or to the right side of the primary charac- 
ter are created by pressing fSHiFT) and the character key. 
To create the graphic character on the A key, press 



|E23ZE1 



MICRO COUOB COMPUTE! 



and the graphic character jj appears on 




Cs h 1 f n f A 
the screen. 

Above other keys are commands (L. DEL, arrow keys) 
and BASIC words. The commands and BASIC words can be 
duplicated by pressing the (contrq lI key and the key 
below the de sired word. To enter RESTORE from the key- 
board, press C CONTROL P CS and RESTORE appears on 
the screen. Keyword input in this manner makes for faster 
program entry. 

Special instructions are located on the Q.A.W, S, and 
Z keys. (controlP CB is the backspace instruction; 
CcoTTTFoTD CSD deletes the entire current program line, 
Cc o n t r ojj [W) generates an up arrow which is the ex- 
ponentiation operator, and (contr oTD GO, GD, and 
CC.ON troTD GD CD are reserved for special purposes. 

C5H 1 ft] CQD toggles the computer back and forth 
between upper and lower case. The lower case characters 
appear as reverse-video, upper-case characters on the 
screen but print on paper in lower case. 

THE MC-10 HAS CONNECTIONS AND MEMORY 

On the back of the MC-10 are a cassette recorder con- 
nector, a slot for future memory expansion kits, a RESET 
button, and an RS-232 connector so the MC-1 can be used 
with serial devices including modems and Radio Shack's 
serial printers or plotters. 

The MC-10 can store over 3K bytes in RAM for user 
access at a single time. When the power is turned off, the 
memory is erased. For permanent storage, programs and 
data must be written to cassette tape. 



ERROR MESSAGES 

The MC-10 displays a full range of error messages- 
in all — in response to programming mistakes. 



■19 



ADD A LITTLE COLOR TO YOUR LIFE 

There are nine distinct colors that can be generated with 
the MC-10. 



Color 


Code 


Black 





Green 


1 


Yellow 


2 


Blue 


3 


Red 


4 


Buff 


5 


Cyan 


6 


Magenta 


7 


Orange 


8 



Each of the 1 6 graphic characters may be displayed with 
a different background color. When (control) QD is 
pressed, the cursor changes colors, and the new color be- 



16 



TRS-80 Microcomputer News, June 1983 



comes the background color for the next graphic character. 
Printing CHR$ (1 28) through 255 will display the 1 6 character 
-iraphic characters in all eight possible colors. Graphic 
naracters can also be entered directly from the keyboard. 
Pressing rsTTTTT^ and the key with the selected graphic 
character, displays the character on the screen. In program 
lines, the graphic character is enclosed in quotation marks. 

10 PRINT" s " 

DO I HEAR MUSIC? 

The Micro Color Computer is able to control and pro- 
gram the sound which comes from the TV's speaker. Volume 
is adjusted on the TV, and pitch and duration are controlled 
with the BASIC SOUND statement: 

SOUND pitch-code, duration fENTERl 
Pitch-code can be any number from 1 to 255 with 1 being the 
lowest and 255 the highest pitch. Duration is any number 
from 1 to 255, and duration is specified in units of .06 sec- 
onds. SOUND 39,1 produces middle-C for .6 of a second. 

ARRAYS 

The MC-10 supports both single and double dimen- 
sioned arrays. Arrays that have more than 1 elements need 
to be dimensioned using the DIM statement. 

USING A CASSETTE 

The cassette baud rate is 1 500. This is a transfer rate of 
approximately 190 characters per second or 1 1 ,000 charac- 
ters per minute. 

Programs can be saved to (CSAVE) or loaded from 
[CLOAD) cassette. The contents of an array are saved to 
cassette using CSAVE* and loaded back into memory from 
cassette using CLOAD*. 

SKIPF searches for a program previously saved to tape. 

THE MC-10 AS A CALCULATOR 

Like other computers, the MC-10 can be used as a 
number cruncher. Itadds( + ), subtracts (-), multiplies (x), 
and divides (/) and performs mathematic functions. 

RELATIONAL AND LOGICAL OPERATORS 

The relational operators are: 



Operator 



> 
< 

< > 

< = 
> = 



Function 



Is greater than 

Is less than 

Is equal to 

Is not equal to 

Is less than or equal to 

Is greater than or equal to 



Logical operators test values to see if they are true (on) or 
false (off). The logical operators AND, OR, and NOT can be 
used in conjunction with IF . . . THEN to perform true/false 
tests. 

STRING AND NUMERIC VARIABLES 

The MC-1 handles two types of variables: numeric and 
string. Numeric variables are designated by any two charac- 
ter combination as long as the first character is a letter and the 
second character is a letter or a number. 

String variables are formed the same way as numeric 
variables with the addition of a dollar ($) sign to indicate a 



string variable. String variables can be added (concatenated) 
together as in the example below. 

NAME$ = FIRST$ + MIDDLE$ + LAST$. 

THE MICRO COLOR BASIC DIALECT 



BASIC IN 


THE MICRO COLOR COMPUTER 





ABS 


IF/THEN 


PRINT TAB 


ASC 


INKEYS 


PRINT© 




ATN 


INPUT 


READ 




CHR$( ) 


LEFTS 


REM 




CLEAR 


LEN 


RESET 




CLOAD 


LET 


RESTORE 




CLOAD" 


LIST 


RIGHTS 




CLS 


LLIST 


RND 




CONT 


LOG 


RUN 




cos 


LPRINT 


SET 




CSAVE 


MEM 


SGN 




CSAVE ' 


MIDS 


SIN 




DATA 


NEW 


SKIPF 




DIM 


ON/GOSUB/RETURN 


SOUND 




END 


ON/GOTO 


SQR 




EXP 


PEEK 


STOP 




FOR/TO/STEP NEXT 


POINT 


STRS 




GOSUB/RETURN 


POKEt 


TAN 




GOTO 


PRINT 


VAL 





fPOKE may be used for addresses in video RAM only. 

YOU SAY YOU WANT FRIENDLY? 

The Micro Color Computer (Model MC-10) has color, 
graphics, sound, a real keyboard— in short, a lot for its re- 
markably low price. The combination of affordability, power, 
and easily understood documentation make this unique com- 
puter friendly to all including the first time user. <M 



HMRS 



(From page 15) 



result in an increased enjoyment of reading. Older students 
who do not enjoy reading can become involved in the read- 
ing process through the motivational format, and develop an 
interest in, and positive attitude toward, reading. For students 
reading at grade level, this series provides an exciting and 
different way to sharpen reading skills. 

Radio Shack's HMRS packages are available from your 
local Radio Shack store or Computer Center, ON SALE 
THROUGH SEPTEMBER 30, 1983. Model III versions are 
sale priced at $41 .97 each (reg. $69.95), except for Charles 
Lindbergh/Amelia Earhart, which is sale priced at $44.97 
(reg. $74.95). The Model I packages are sale priced at 
$23.98 (regularly $59.95) with Charles Lindbergh/Amelia 
Earhart at $25.98 (regularly $64.95), The optional HMRS 
Student Records System for Model III (26-2521 ) is on sale for 
$1 7.97; sale price for the Model I version (26-2508) is $9.98. 
Sale prices are suggested and may vary at individual stores 
and dealers. TRS-80 MicroPILOT, which is required to run 
HMRS programs, is itself a complete command-oriented 
courseware authoring system that you can use to create your 
own computer assisted instruction programs. Model III 
MicroPILOT (Cat. No. 26-2718) is on sale for $71.97 (regu- 
larly $119.95). The Model I version (Cat. No. 26-2205) is on 
sale for $39.98 (regularly $99.95). For more information on 
how you can use the High Motivation Reading Series, contact 
your local Radio Shack Store or Computer Center, or contact 
the Radio Shack Regional Educational Coordinator for 
your area. J& 



TRS-80 Microcomputer News, June 1983 



17 



AgriStar 



Charting— An Important Electronic 
Marketing Tool for Agriculture 



by Kathryn Frame 



Charts— a visual picture of exactly what is happening in 
the agricultural marketplace— are now available to farmers, 
ranchers, ag bankers and agribusinessmen via Agri-Star, 
America's Agricultural Information and Computing Network. 

This new electronic marketing tool can aid those in agri- 
culture to predict future price trends of crops and livestock. 
This, in turn, can improve the timing of sales and purchases, 
so important to a profitable business. 

John Hoist, a Center Junction, Iowa, farmer, uses bar 
charts and moving average charts to determine his market- 
ing decision— when to buy and when to sell corn and soy- 
beans. 

The Agricultural Services Department of Marine First 
National Bank, Janesville, Wisconsin, pulls charts on a 
weekly basis to advise its customers as to when to buy and/or 
sell their crops and livestock. According to James E. Atchin- 
son, Assistant Vice President, charts pulled on a weekly basis 
by the department include corn, soybean, fat cattle and 
hogs. 

Once a microcomputer or data terminal, a modem, and 
a printer have been added to the list of hardware, an agricul- 
tural businessman should have to insure a maximum profit 
from his product, Agri-Star can provide: 

• Information at much less cost than printed 
market advisory services. 

• Only the information desired, eliminating 
hours of research and reading time; 

• Information continuously updated 
24-hours-a-day through AgriScan— a service 
of Agri-Star's continuously updated 
agricultural business information analysis 
and recommendations. 

• In'addition to charts, AgriScan also offers 
business: markets, prices, finance, weather, 
market analysis, market advisories, and 
news. 

• Codefile— an economical and time-saving 
function which allows a user to build an 
online file of up to 10 report access code 
numbers he regularly uses. And, the user can 
store as many codefiles as he needs. 

These access codes are then stored in the 
Agri-Star computer for use anytime he wants 
to connect to Agri-Star. 

• Rapid use of a printer, and, thus low 
connect time, is also possible, with the 
use of a RUN function in tandem with the 
codefile function. 



WHAT CHARTS ARE CURRENTLY AVAILABLE ON 
AGRI-STAR'S AGRISCAN? 

There are five types of charts on AgriScan for use in 
analyzing market trends and changes in price direction: 

• Buy/Sell Decisions: Bar Charts 

• Spot Trends: Moving Averages 

• Overbought/Oversold: Relative Strength Index 

• Measure of Trading Activity: Volume Charts 

• Market Change: Open Interest 

• Spot Signals: Point and Figure (to be 
available in the near future) 

Commodities charted on AgriScan include: corn, T-Bills, 
wheat, soybeans, soymeal, cotton, feeder cattle, live cattle, 
hogs, and pork bellies. 

Both Top Farmer Current Charts (TFC) and Top Farmer 
Historical (TFH) are available for each of the five charts. 

TOP FARMER CURRENT CHARTS (TFC): 

Using Agri-Star's keyword search ability, the chart of 
current market activity desired can be obtained by typing in 
the information desired. This will yield a menu of Top Farmer 
Current (TFC) charts. The charts pulled up on the screen will 
be those of current market activity. The computer will then 
assemble a menu of charts covering the most recent two 
months of trading activity for any particular chart type and 
contract month chosen. 

The menu seen will show all charts available for that chart 
type and contract month, listed by the contract months cov- 
ered in the AgriScan charting service. 

(Once the chart access code is entered, the printer will 
produce a continuous printout of the chart displayed with the 
Y axis shown horizontally, and the X axis shown vertically. This 
orientation is exactly the opposite of how the X and Y axes 
normally appear and has been adopted for AgriScan charts 
in order to accommodate the 80-character limitation of the 
majority of printers. Once the chart copy is printed and turned 
on its side, a complete chart showing the latest two months 
trading for the commodity and contract being tracked is 
ready for analysis.) 

If " background" chart activity on a particular TFC chart is 
desired, a chart of previous market activity can be obtained 
by accessing the Top Farmer Historical (TFH) charts in 
AgriStar. 

TOP FARMER HISTORICAL CHARTS: 

"TFH" charts cover market activity for all contracts and * 
all chart types represented in TFC charts, but with one major 
difference: TFH charts in AgriScan end where TFC charts 



18 



TRS-80 Microcomputer News, June 1983 



begin. That is, TFH charts cover a maximum of 1 6 months of 
market activity, counting backwards in time from week one of 
l he currently recorded TFC chart. 

BUY/SELL DECISIONS: BAR CHARTS: 

Bar charts in Agri-Star give a graphic representation of 
each day's trading activity for a specific commodity and 
contract month. The "picture" that bar charts give of price 
movements can be used to anticipate future market trends 
and changes in price direction. 

These charts are: updated each day shortly after the 
markets close; are plotted from the daily high, low, and 
closing prices of a specific commodity contract; and are 
plotted Monday through Friday only, with holidays left blank. 

By use of technical bar chart analysis, current short and 
long term trends can be determined. Once this determination 
is made, major marketing decisions can be made— when the 
major trend is up, there would be little reason to rush sales of 
farm products (unless a reasonable profit can be locked in, 
and, by doing so, avoiding future price risk). When the major 
trend shifts downward, forward pricing is usually immediately 
available. 

In following trends indicated by the consistent use of bar 
charts in conjunction with the information surrounding the 
Payment-In-Kind (PIK) program, the Agricultural Services 
Department of the Marine First National Bank in Janesville, 
has advised its customers to stay out of the market until it 
levels off, according to James Atchinson. 

Iowa farmer, John Hoist, indicates that weekly charts 
give him a true indication of what the pricing trend will be and 
confirm to him what the daily charts have been telling him. 

SPOT TRENDS: MOVING AVERAGES CHARTS: 

The moving average chart plots two or more averaged 
figures over a given period of time. These charts plot 4-day, 
9-day, and 18-day moving averages. 

With the information obtained from these charts, a deter- 
mination can be made as to whether buying pressure is 
consistently stronger than selling pressure, or vice versa- 
selling pressure is stronger than buying pressure, and, thus, 
which way the major trends are pointed, 

OVERBOUGHT/OVERSOLD: RELATIVE STRENGTH 
INDEX CHARTS: 

The Relative Strength Index (RSI) chart is used to indi- 
cate when markets become overbought or oversold. This 
index will often accurately indicate when markets are turning 
either up or down, or giving an entry or exit signal. But, it will 
not provide any indication of when to reverse any previously 
taken position. It is, therefore, best used as a tool in combina- 
tion with other technical trading systems and with fundamen- 
tal information. 

MEASURE OF TRADING ACTIVITY: VOLUME CHARTS: 

This barometer of trading activity shows the number of 
trades in all futures contracts for any particular commodity on 
a given day. As a barometer of trading activity and an indica- 
tion of the type of buying, volume charts, combined with 
open interest and bar charts, often show changes in market 
conditions which are not necessarily connected with appar- 
ent developments in supply and demand of the cash com- 
modity. Thus, volume is important to watch, because 
changes in volume are often associated with price changes in 



the same direction. For example, a gradual increase in vol- 
ume during an uptrend suggests a further price rise, 
whereas, a rapidly accelerating volume following a substan- 
tial upward price movement often signals a major top and a 
possible price reversal. 

Charts in Agri-Star for volume of trading are drawn per 
commodity not per contract, as most other charts are. 

MARKET CHANGES: OPEN INTEREST: 

As a barometer of trading activity, and an indication of 
the type of buying, open interest often can show changes in 
market conditions which are not necessarily connected with 
apparent developments in supply and demand of the cash 
commodity. For example, new export business may be re- 
flected in futures markets before it is publicly announced, 
because it results in increased open interest. This is caused 
by commercial exporters buying futures contracts of the 
commodity they are going to export to protect themselves 
against price increases. 

Open Interest charts in Agri-Star are drawn per com- 
modity, not per contract, as most other charts are. 

SPOT SIGNALS: POINT & FIGURE CHARTS: 

(To be added in the near future). A point and figure chart 
gives a clear indication of when the market is making either- 
higher highs or lower lows. Thus, the confirmation of a 
downtrend, for example, would provide a signal to the 
hedger to either sell the cash commodity or to get short in the 
futures market, or both. 

Unlike bar charts, however, the point and figure charts 
signal specific price points for buying and selling the com- 
modity being charted. 

KNOWING WHAT CHARTS ARE AVAILABLE ON 
AGRISCAN 

Help screens for Top Farmer Charts (TFC) and Top 
Farmer Historical Charts (TFH) are available under the 
AgriScan Help Menu, with the general heading: "Using Tech- 
nical Charting Tools. .HELP1 2." A "submenu," specific to the 
different types of Agri-Star charts, will appear as part of this 
help screen. 




(Continued on page 30) 



TRS-80 Microcomputer News, June 1983 19 



Communication 



Communications Corner 



by Al and Dru Simon 



Hello and welcome back to Communications Corner. 
Last month we discussed the details and functions of each 
part of the RS-232-C connector, hopefully, learning "Every- 
thing we wanted to know about RS-232-C but were afraid to 
ask." As a follow-up to what we have discussed, this month's 
column might be appropriately entitled, "Well, Now That I 
Know All That, What Good Does It Do Me?" In response to 
that question— "A Lot!" Let's talk about it. 

Once you have learned what the functions of the pins are 
(as described last month) and you have learned how to 
control them (as we'll describe this month), you will be able to 
interface just about any piece of equipment to any other piece 
of equipment. As an example, one of my customers had a 
problem because they wanted the information contained on 
their micros put onto their mainframe. This was no easy task, 
because they had Apple lis, Apple Ills, Wang Word Proces- 
sors, a Burroughs mainframe, and Radio Shack Model 1s 
and Model 2s. The Apple representative said "It can't be 
done." The Burroughs man said "Can't do it!" I said "Why 
not?" I stepped in, and, as a result, my customer now enjoys 
full communications between all his equipment! You only 
have 25 pins! Once you know how to control those 25 pins 
there is NO serial device that you can't interface to any other 
serial device! 

The object of the column this month is to teach you how 
to make up special cables to connect two odd pieces of 
equipment to each other where no off-the-shelf cable is avail- 
able. You will learn a little bit about cable theory, and you will 
definitely learn how to connect your computer to that serial 
peripheral that you just bought. It is all very simple because 
the theory behind it is as obvious and clear as a sunny day! 

As an example of some of the peripherals that you might 
be interested in interfacing, let me rattle off a short list: 
Modems, Scanners, Printers, Terminals, and so forth. The 
RS-232-C can also be used as a simple device control. 

One of the first things you should know about RS-232-C 
is the fact that it's a PORT, and that differs from a memory 
address in the following manner: A memory address is a 
location which is contained in RAM (Random Access Mem- 
ory) and can be addressed or read, and data can be stored in 
it. A port is simply a hard-wired device for passing information 
in or out. It is not addressable in the same manner that 
memory is in that you cannot store anything in a port location. 
You can send data out a port or read a port, but you cannot 
store anything in a port. 

TO CONNECT TWO COMPUTERS TOGETHER 

Let's get down to the business at hand. Now that we 
know what all the parts of our connector do, what interesting 
and useful things can we do with it? Let's start with the 
basics— the easiest of all applications for an RS-232-C would 
be as an interconnecting cable to connect two computers 



together. I am often asked how this can be done. Let's say 
that you have a Model 16 and a Model 3, and you want to 
move some programs from one to the other without going 
over telephone lines. It does seem rather strange to have to 
phone the computer in your living room from the computer in 
your bedroom! Sounds more like something your teenager 
might do— and you need to get those games onto the other 
computer so your teenager will leave your computer alone! 
The easiest way to accomplish the transfer of programs 
would be for you to make up a cable which will allow you to 
connect the two machines together so that you will need no 
modem at all. This type of cable is cryptically called a Modem 
Eliminator. (Oh, this computer terminology can be complex 
and mysterious sometimes, can't it?) 

The job of creating this cable can be done very easily. If 
you refer to last month's chart, you'll see that pins 2 and 3 are 
Transmit and Receive Data. Pins 4 and 5 are Request to Send 
Data and Clear to Send Data. Those two pairs of pins always 
go together, sort of like salt and pepper shakers do. There are 
also 3 more pins which you have to consider, namely the Data 
Set Ready, pin (6); Carrier Detect, pin (8); and Data Terminal 
Ready, pin (20). These three pins also have to be present to 
accommodate most software. Remember that this is a soft- 
ware controlled item, not a hardware controlled item. If your 
software is looking for a carrier detect, then you have to have 
one. Most programs which run on Radio Shack computers 
require these three signals. 

The easiest way to insure that you are getting these three 
signals when you are making a Modem Eliminator (or 
Jumper Cable as it is also called— make you think of your 
car's battery?) is to tie pins 6, 8, and 20 together at both ends 
of the DB-25 connectors. Most often you will be using male 
connectors at both sides of your ribbon cable, and the easiest 
way to jumper these together is by opening your connector, 
taking a piece of 30 gauge KYNAR (which is a type of very 
thin insulated wire which is readily available and usually in its 
own special container that cuts and strips the wire for you) 
about two inches long, stripping it, but leaving about 1 A to 3 /s 
of an inch of insulation on the wire. Starting from the inside of 
the connector working toward the outside, place the bare 
KYNAR on pin 6, slide down the piece of insulation against 
pin 6 so that it protects pin 7, and put the piece of KYNAR 
from the outside of pin 8 to the inside on pin 8. From pin 8 
going straight across, you will run into pin 20. Bring the 
KYNAR through to pin 20, and clip off the excess. Now when 
you lay your ribbon cable over it, it will secure the KYNAR into 
place when the connector is closed. 

Please remember that in order for this cable to allow your 
computers to "talk" to each other the Receive must connect 
with the Transmit!! Now since you must not connect Receive 
to Receive or the Transmit to Transmit you must remember to 
reverse wires 2 and 3 on the other side of the cable! If you 



20 



TRS-80 Microcomputer News, June 1983 



look at the connector and look at the ribbon cable you're 
working with, you will notice that the cable is laid out as 
follows: 

1 14 2 15 3 16 4 17 5 18 6 19 7 20 8 21 9 22 10 23 11 24 12 25 13 

In fact, if you look at the DB25 itself, you will see the 
numbers of the wires in the ribbon cable listed on the connec- 
tor, set up as follows: 

f V 2 3 4 ST"™ 7 8 """"9 "(Til "l2 ; 13 V 

V 1*4 1*5 1*6 1*7 1*8 f 9 2*0 2*1 2*2 2*3 2*4 2*5 / 

Notice that you start off with 1,14,2, etc. so when you're 
looking for a particular pin location on the ribbon cable you 
must count every other wire, because every other wire goes 
to the bottom half rather than the top half of the connector. 
When locating wires, you must be exceedingly careful that 
you have located the correct one! Now, we wish to reverse 
wires 2 and 3 in order to make our Transmit wire go into our 
Receive wire and vice versa, so count carefully and locate 
wires 2, 3, and 1 5. (1 5 will be in the middle, going to the lower 
half of the connector). Once you are certain you have located 
the correct three wires, split the cable there carefully; cutting it 
just a bit with a razor to separate these three wires from all the 
rest. Take these three wires (which will be 2, 15, and 3) and 
just twist them around so that the #2 wire is where the #3 wire 
was; the #1 5 wire remains unchanged in the middle, and the 
#3 wire is where the #2 wire was. 

Count carefully again and locate wires 4, 17, and 5. 
Reverse these wires as you did above with wires 2,15, and 3. 
Press the wires onto the pins. The balance of the wires can be 
pressed onto the pins in their natural order. Go to the other 
side of the connector and tie together pins 6, 8, and 20 as you 
did on the first end of your cable, then just lay the ribbon cable 
in on top and put the connector over it. Close the connector 
and trim it. You now should have a connector with two sec- 
tions where wires are reversed. 



SOME HINTS FOR CABLE MAKERS 

The easiest way to RUIN a cable is to put it on and take it 
off a connector repeatedly, so you must try to do the job 
carefully and accurately the first time. 

There is a very easy way to seat a wire in a pin, and we 
recommend that you use this method. You will need a "pin 
setter" to seat the wire into the pin without damaging either. 
The "magic" tool that we use as a "pin setter" is the front of a 
ball point pen! That's all it takes, folks! Just lay your cable 
across the pins and while holding it tightly around the connec- 
tor, rub the PLASTIC barrel of the pen (use plastic so you 
don't damage the pins) across the cable until you BEGIN to 
see the point of the pin sticking through the insulation. At this 
point you take the front of the pen, and one by one put each 
pin inside the barrel of the pen. This will push the cable down 
around the pin without damaging the pin itself. Care should 
be taken to lay the cable onto the pins very carefully other- 
wise you will be causing shorts between the pins. 

Once your connector is completed you can plug one 
end into each of your computers and transmit programs at 
9600 baud or whatever speed you like best. Your two com- 
puters are now connected to each other! 



CONNECTING A COMPUTER TO A MODEM 

To connect a computer to a modem, all you have to do to 
make a cable is simply lay in the cable as is. When you make 
up this cable, you must be certain that you identify pin 1 on 
your cable with a stripe or other marking to make sure that it 
goes to pin 1 on both connectors. 

Please note: The above is true for all of the Radio Shack 
computers except the Color Computer, where you MUST tie 
in the pins 6, 8, and 20 if you are using a NON-Smart modem. 
The Modem II and DC 1200 are Smart Modems— all other 
modems must have the 6, 8, 20 jumper installed at the 
modem end of the cable. Unless— as in the Modem 1 —there 
is a force DTR switch.) 

WHAT IF YOU HAVE A NON-RADIO SHACK PRODUCT? 

"But, Al," you say. "I have a product someone gave me. 
How do I get it to interface with my Radio Shack equipment?" 
My answer is simple. READ THE MANUAL THAT CAME 
WITH THE EQUIPMENT!! Within the manual you will find "pin 
outs" for the serial port (in other words— the description of 
each pin's function). They may be set up differently from your 
Radio Shack equipment, but there will never be more than 25 
pins, each with its own signal. You already know (from last 
month's article) the function of each signal. All you have to do 
is match signals from one side of the cable to the other side. 

Let's say you have an unusual cable that connects to 
your printer where perhaps Receive Data is pin 1 instead of 
the usual pin 3. All you have to do is make up a cable that will 
match the proper pins to the proper functions. Having done 
this you're ready! 

CHECKING OUT YOUR CABLE 

I do advise though, that after you have made a cable you 
take a volt/ohm meter and make certain that your cable does 
not have any shorts in it. If you don't have such a meter a 
simple 1 -V2 volt battery and light bulb will do. Wire the bulb to 
the battery on one terminal; take the other terminal from the 
battery and the other terminal from the light bulb and extend 
wires from them. Touching these 2 wires to anything which is 
continuous will cause the light to light, so if you want to check 
any connections that you have made, simply touch your two 
wires to it. You ought to be able to make the light light up. If 
it doesn't then reset your pins; push down a little further on 
the plastic because the connection was probably not made 
correctly. 

HOW DO YOU CONTROL THE PINS? 

Armed with above new skills let's talk about how you 
control each of these pins. There are three methods with 
Radio Shack equipment of controlling these pins. The first 
method is through machine language Service Calls (or ROM 
calls). Please refer to the technical sections of your Manual to 
locate and find syntax for these calls. There you will find 
machine language service calls for the Models 2,12, and 1 6, 
and machine language ROM calls for the Color computer, 
and Models 1 and 3. The manual will define what they are and 
how to use them. 

In the case of direct port addressing for the Models 1 and 
3 please refer to Figure 1 . In the case of the Color Computer, 
since there is no UART (a device which turns parallel data into 
serial data), all output must be manually configured and 



TRS-80 Microcomputer News, June 1983 



21 



timed and sent directly to the port. Please refer to your Color 
Computer technical manual for port addresses and methods. 

Figure 1. 



When dealing with Models 2, 12, and 1 6 for port addresses, 
please see Figures 3 and 4. 



DATA 
BIT 


MODEM STATUS 
REGISTER 


CONFIGURATION 
SENSE SWITCHES 


UART CONTROL 

REGISTER AND 

HANDSHAKE LATCH 


UART STATUS 
REGISTER 


D7 


Clear to send 
Pin 5 DB-25 


Even Parity Enable 
1 = even, = odd 


Even Parity Enable 

1 = even, = odd 


Data Received 
1 = Condition true 


D6 


Data Set Ready 
Pin 6 DB-25 


Word length Select 1 


Word length Select 1 


Transmitter Holding Register 
Empty 1 = Condition true 


D5 


Carrier Detect 
Pin 8 DB-25 


Word length Select 2 


Word length Select 2 


Overrun Error 

1 = Condition true 


D4 


Ring Indicator 
Pin 22 DB-25 


Stop Bit Select 
1 = 2 bits, 0= 1 bit 


Stop Bit Select 
1 = 2 bits, 0= 1 bit 


Framing Error 
1 = Condition true 


D3 


Unused 


Parity Inhibit 
1 disables parity 


Parity Inhibit 
1 disables parity 


Parity Error 

1 = Condition true 


D2 


Unused 


Baud Rate 3 


Break 

Disables Transmit data 


Unused 


Dl 


Receiver Input UART P20 


Baud Rate 1 


Data Terminal Ready 
Pin 20 DB-25 


Unused 


DO 


Unused 


Baud Rate 2 


Request to send 
Pin 4 DB-25 


Unused 




IN 0E8H 


IN 0E9H 


OUT 0EAH 


IN0EAH 



BIT ALLOCATIONS FOR REGISTERS AND LATCHES 



The information in Figure 1 can be found on page 1 7 of 
the manual for the Model 1 RS-232-C board (26-1 145). 

Figure 2. 

NIBBLES FOR BAUD RATE CONFIGURATION 
ON FIGURE 1 



Nibble Loaded 



Transmit or Receive Baud Rate 



HEX 


BINARY 




OH 


000 


50 


1H 


001 


75 


2H 


010 


110 


3H 


011 


134.5 


4H 


100 


150 


5H 


101 


300 


6H 


110 


600 


7H 


111 


1200 



The information in Figure 2 is located on page 16 of the 
Model I RS-232-C interface board manual (26-1145). 

For Models 2, 12, and 16 there are three read registers 
for Channel B and two read registers for Channel A within the 
SIO which can be used to obtain status information. Read 
registers through 2 (Figure 4) contain the interrupt vector 
which is only valid for the Channel B register. In order to read 
the contents of a particular read register other than read 
register 0, your system program must first write the register 
number which you choose to look at to write register 0. Then 
by doing an IN to that register, the contents of that register will 
be returned. 

Within the SIO there are seven write registers for channel 
A and eight for channel B which are programmed separately 
to configure the function of the channels. The interrupt vector 
for both channels is contained in write register 2 and is only in 



the channel B register set. The write registers require two 
bytes (excepting write register 0). The first byte is to write 
register and contains three bits that point to the selected 
register. The second byte is the actual control word written 
into the register to configure the SIO. Following are two 
example usages. The first is in BASIC, and the second is in 
Machine Language. 

Figure 3 

PORT ADDRESS LOCATION 
FOR MODELS 2, 12, AND 16 



Port No. 



Allocation Function 



F4H 


SIO A 


F5H 


SIO B 


F6H 


SIO A 


F7H 


SIO B 



Channel A Data 
Channel B Data 
Channel A Command/Status 
Channel B Command/Status 



The information in Figure 3 is found on page 20 of the 
Model II Technical Reference Manual (26-4921 ). It is applica- 
ble for the Models 12 and 16 as well. 

The BASIC example: 

To set the DTR in the Models 1 and 3, do an OUT 234, 1 . 
Use the table in order to see which bits must be set. 

For example, in order to set the number of stop bits to " 1 " 
with the larger machines, you would do the following: 

OUT &HF6.4 (attention register 4!!!!!) 

OUT &HF6,4 (set one stop bit) 

The machine language (Z80) example: 

LD B.0F6H 'Load control register address into B 

OUT (B),04H 'Attention register 4 !! 

OUT (B),04H 'Set bit 2 (one stop bit) 

To further illustrate: 



22 TRS-80 Microcomputer News, June 1983 



Figure 4. Read and Write Bit Function Tables 

READ REGISTER 

| D 7 ' D 6 i 5 j 4 [ 3 1 2 | 0, j D„ | 



READ REGISTER 2 

I D, ! D 6 j D 5 ! D 4 ! D 3 I D 2 | D, I D 



READ REGISTER If 



D 4 D 3 D 2 



- Rx CHARACTER AVAILABLE 

- INT PENDING (CH. A ONLY) 
-Tx SUFFER EMPTY 

-DCD 
-SYNC/HUNT 

•Tx UNDERRUN/EOM 
■ BREAK/ABORT 

•UseaWun Exiemai Staius 
mierruDl Mode 



•V1t 

• V2t 

• V3t 



INTERRUPT 
VECTOR 



I FIELD BITS I FIELD BITS IN 
IN PREVIOUS SECOND PREVIOUS 



• PARITY ERROR 

•Rx OVERRUN ERROR 

• CRC/FRAMING ERROR 
END OF FRAME (SDLC) 



TUsea Wiin Special Receive Conam< 



■Residue Daia Fc 
R. Bus'Characler 



i Eight. 
Programmed 



ii Siaus aik 
Prog'ammec 



Read Register Bit Functions 



WRITE REGISTER 



REGISTER 

1 REGISTER 1 

REGISTER 2 

1 REGISTER 3 

REGISTER 4 

1 REGISTER 5 

REGISTER 6 

1 REGISTER 7 



NULL CODE 

1 SEND ABORT (SDLC) 

1 RESET EXT/STATUS INTERRUPTS 

1 1 CHANNEL RESET 

1 ENABLE INT ON NEXT Rx CHARACTER 
1 1 RESET TxINT PENDING 
1 1 ERROR RESET 
1 1 1 RETURN FROM INT (CHA ONLY) 

NULL CODE 

1 RESET Rx CRC CHECKER 

RESET Tx CRC GENERATOR 

1 RESET Tx UNDERRUN/EOM LATCH 



WRITE REGISTER 4 

| D 7 | D e | D s [ D, [ D 3 | D ; | 0, [ d7| 



-PARITY ENABLE 
-PARITY EVEN/ODD 



SYNC MODES ENABLE 
1 STOP BIT/CHARACTER 

1 </» STOP BITS/CHARACTER 

2 STOP BITS/CHARACTER 



8 BIT SYNC CHARACTER 

1 16 BIT SYNC CHARACTER 

1 SDLC MODE (01 1 1 1 1 10 FLAG) 
1 1 EXTERNAL SYNC MODE 



XI CLOCK MODE 

1 X16 CLOCK MODE 

1 X32 CLOCK MODE 
1 1 X64 CLOCK MODE 



WRITE REGISTER 1 

I D 7 I D 6 I D, I D 4 I D 3 | D J 0, I D 



-EXT INT ENABLE 
-Tx INT ENABLE 
-STATUS AFFECTS VECTOR 
(CH. B ONLY) 



Rx INT DISABLE 

1 Rx INT ON FIRST CHARACTER 

1 INT ON ALL Rx CHARACTERS (PARITY AFFECTS VECTOR) 
1 1 INT ON ALL Rx CHARACTERS (PARITY DOES NOT AFFECT 

VECTOR) 



- WAIT fflEADY ON R/T 
-WAIT/READY FUNCTION 
-WAIT/READY ENABLE 



•Or On 
Special 
Conailic 



WRITE REGISTER 2 (CHANNEL B ONLY) 



WRITE REGISTER 5 



-Tx CRC ENABLE 
- RTS 

-SDLC/CRC-16 
-Tx ENABLE 
-SEND BREAK 



Tx 5 BITS (OR LESSJ/CHARACTER 
Tx 7 BITS/CHARACTER 
Tx 6 BITS/CHARACTER 
Tx 8 BITS/CHARACTER 



0, D 3 D, 



WRITE REGISTER 3 

| D 7 | Dp | D 5 [ D 4 [ D 3 [ 0; [ D, | | 



Rx 5 BITS/CHARACTER 

1 Rx 7 BITS/CHARACTER 

Rx 6 BITS/CHARACTER 

1 Rx 8 BITS/CHARACTER 



WRITE REGISTER 6 

[ D 7 | D 6 [ D 5 | D 4 | D 3 | D ; | I 



INTERRUPT 
VECTOR 



-SYNC BITO 
-SYNC BIT 1 
-SYNC BIT 2 
-SYNC BIT 3 
-SYNC BIT 4 
-SYNC BITS 
-SYNC BIT 6 
-SYNC BIT 7 



•Also SDLC Address Field 

WRITE REGISTER 7 

|d 7 |d 6 |d 5 |d 4 |d 3 |d 2 | Di |d | 



— Rx ENABLE 

— SYNC CHARACTER LOAD INHIBIT 

— ADDRESS SEARCH MODE (SDLC) 

— Rx CRC ENABLE 

— ENTER HUNT PHASE 

— AUTO ENABLES 




— SYNC BIT 15 



Write Register Bit Functions 



•For SDLC II Musi Be Programmed 
lo On it no For Flag Recognition 



TRS-80 Microcomputer News, June 1983 



23 



LD B.0F6H 'Load control register 
address into B 

OUT (B),04H 'Attention register 4 !! 

OUT (B),08H 'Set bit 3 (2 stop bits) 

In the case of the Models 1 and 3 the first OUT command 
is not necessary and B register should first be loaded with 
port address you desire. 

Using the above tables you can see how you can control 
each of the pins in the DB25 connector. If you have specific 
questions, please contact your local service representative or 
write to us in care of Communications Corner, P.O. Box 291 0, 
Fort Worth, Tx 76113-2910. You now should have enough 
new knowledge and skills to be able to interface and program 
any RS-232-C peripheral device. 

PARTS ARE AVAILABLE 

It is possible to purchase the parts needed to build your 
cables from Radio Shack. 
Connectors 

D-Submini 25 Male for RS-232C bus 
(276-1559) Sug. Ret. $4.99 

D-Submini 25 Female - Ideal for Cable Extensions 
(276-1565) Sug. Ret. $4.99 

Solder D-Submini 25 Connectors 

Male (276-1547) Sug. Ret. $2.99 

Female (276-1548) Sug. Ret. $3.99 
Hood (276-1549) Sug. Ret. $2.19 

Cable and Wire 

Flat RS-232C 25 Conductor 5' Cable (278-772) 
Should be available June/July Sug. Ret. $3.59 

KYNAR, 30 gauge wire Sug. Ret. $2.39 

Red (278-501) 

White (278-502) 

AND IF YOU DON'T WANT TO BUILD THE CABLE . . . 

For those who don't want to build their RS-232-C acces- 
sories, Radio Shack offers the following RS-232-C cables and 

accessories. 

Cat. Sug. 
No. Ret. 



Color Computer to RS-232C 

I ntprf f\of* 
ModelIII/4/12 RS-232C 5' Flat 

Cable 
Model III/4 8" Extender - Allows 

use of round RS-232C cables 

with the Model III/4 
Model 11,16 RS-232C 5' Cable 

with Terminator (Round with 

molded plugs) 
RS-232C Cable for Model 12 

or for extending any 

RS-232 Cable 

10' 

25' 

50' 

100' 
RS-232C Cable Ext. for 

Longer Runs 



(26-3014) 
(26-1408) 

(26-1497) 

(26-4403) 



(26-1490) 
(26-1491) 
(26-1492) 
(26-1493) 



$19.95 
$19.95 

$17.95 

$39.95 



$29.95 
$39.95 
$54.95 
$89.95 



(26-1495) $29.95 



Null Modem Adapter— Allows 
two CPUs to communicate 
directly using modem software (26-1496) $29.95 

THE CORNER MAILBOX 

I have always liked the idea of trading user made pro- 
grams, but all the phone numbers are not in my area. If you 
know of any in my area or know how to get a catalog of 
numbers, please send it to me. Also do I need an RJ11C 
modular jack for a Modem II? 

Buc Burgess 

Altamonte Springs, Fl 

Dear Buc, 

Although our January article did not specifically mention 
bulletin boards in your area, we know that there are plenty in 
Florida. Call any of the boards listed in the January or April 
articles, and refer to their lists of other bulletin board numbers. 
Keep a hard copy of these lists and refer to them as need 
arises. You will probably find new boards listed on each one 
that you call. 

About your Modem II— yes, you do need the RJ11C 
modular jack. 

Although I can effectively use my Model III as a terminal, 
there does not seem to be much software available for run- 
ning the modem. The IBM system uses an 80 character CRT 
while the Model III is only 64. I would like to eliminate the 
wrap around problem. The first idea I had was to route the 
information from the RS-232-C to my line printer instead of the 
screen. The 1.3 version of TRSDOS, however, returns 
ERROR 31 (program not found) whenever I attempt to use 
the ROUTE command. 

Steven C. Rowland 

Monterey, Ca 

Dear Steven, 

You idea is a good one. However, it is quite true that the 
ROUTE command has been replaced! The best way to ac- 
complish what you're trying to do is to open your buffer, 
capture the incoming information as a disk file and then print 
the disk file. However, if you should want to use your printer, 
you must POKE &H4222 with a two byte ASCII abbreviation 
of the desired source device (one of Kl, DO, Rl, RO, or PR) and 
&H4220 with a two byte destination abbreviation. See page 
50 of your manual to see how to do this from BASIC. 

I am using a Model III with 2 disk drives to communicate 
to an HP3000. I notice communications package does not 
seem to be using the $RSTX and $RSRCB ROM calls. They 
seem instead to be talking to ports E8 through EB instead. 
Your assistance is appreciated. 

Dr. V. Zitko 

St Andrews, New Brunswick 

Dear Dr. Zitko, 

You are quite correct in that the terminal package does 
not use the ROM calls. Instead it directly addresses the ports 
as the above article describes. If you have any further ques- 
tions about it, please write to us again. 

That about wraps it up for another month in ourcorner, 
please watch for our next month's article in which we 
will discuss Direct Cursor Addressing, Communicating 
Graphics, and methods of printer dumping. 'Happy 
Communicating! ^ 



24 



TRS-80 Microcomputer News, June 1983 



Color PILOT 



by George Gerhold 



Education 



Editor's note: Color PI LOT was developed for the TRS-80 
Color Computer by Dr. George Gerhold and Mr: Larry 
Kheriaty of Western Washington State University. Kheriaty 
and Gerhold were the original developers of COMMON 
PILOT, a widely used version of the PILOT language. 

Color PILOT is a language used to create instructional 
dialogs on the TRS-80 Color Computer. Because Color 
PILOT makes it easy to code flexible screen design and 
answer processing, the language can be used by teachers 
and curriculum developers who are not computer experts. 
Color PILOT is a version of COMMON PILOT, which means 
that instructional programs written in PILOT for many other 
machines can be converted for use on the Color Computer 
very easily. 

Why use Color PILOT instead of BASIC for instructional 
programming? That's like asking a fence builder, "Why use a 
post-hole digger when shovels are available?" In both cases, 
the answer is, "because your productivity is higher and the 
product is better when you use a tool designed for the task at 
hand." The larger the project, the more important this 
becomes. 

Instructional programming and computational program- 
ming are very different tasks. Good instruction involves trans- 
mitting a large quantity of textual and graphic information in 
very digestible form. It also requires the ability to accept and 
correctly process a wide variety of student input. Color PILOT 
makes it easy to code (program) common instructional oper- 
ations. For example, students are likely to make spelling and 
typing errors, and they are likely to use a variety of words and 
expressions in responding to questions. Color PILOT makes 
it easy for you to allow for such variety in responses; BASIC 
does not. On the other hand, BASIC makes it easy to code 
loops, which repeat operations many times. In instruction, 
however, we seldom wish to repeat the same thing many 
times, so Color PILOT does not have such an operator. 

Let's take a look at how Color PILOT helps the instruc- 
tional programmer. We'll begin with output. Think of the com- 
puter's display as a blackboard, not as a piece of paper. We 
do not have to fill the screen with information. We can write on 
it anywhere we please. We can use the whole screen for a 
single idea, or we can divide it into sections; we can mix 
graphics and text; we can write in large and small letters; we 
can make any characters we need; we can erase selected 
portions while keeping others; and we can use an unlimited 
number of panels at little extra expense. All of these things 
can" be done using Color PILOT. 

In Color PILOT, you use two main instructions to gener- 
ate displays: the TYPE instruction and the GRAPHIC instruc- 
tion. The following TYPE instruction (with the computer 
understanding uppercase "T" as the code for the instruc- 
tion), will display the message "Welcome to Color PILOT" on 
the screen: 



TWelcome to Color PILOT. 

Everything after the colon in the TYPE instruction ap- 
pears on the screen, at the current cursor position, as typed. 
(Notice that you can use upper and lower case in Color 
PILOT.) Modifiers can be added to the TYPE instruction to 
affect the way messages are displayed on the screen. The 
"S" modifier (for "Screen") clears the screen, then prints the 
message starting at the screen's upper left corner: 

TS:Welcome to Color PILOT. 




Many of the display enhancements for text are controlled 
via the GRAPHIC instruction ("G"). You can use this instruc- 
tion to change color sets, to select normal or reverse video, 
and/or to use double-size characters. By combining these 
options in different ways, you can get a total of eight different 
screen modes. The instruction: 

G:M6 

selects mode 6— namely, the alternate color set, normal 
video, and large characters. 

By using modifying operators with the GRAPH IC instruc- 
tion, you can specify the screen coordinates for text display or 
for drawing graphics. The screen is treated as a piece of 
graph paper, and positions are specified by an X,Y pair of 
numbers or variables. The origin is in the lower left corner, 
unless moved. To position text on the screen, we use the 
WINDOW ("W") operator. The following instruction will posi- 
tion the text cursor in the center of the screen: 

G:W126,96 



TRS-80 Microcomputer News, June 1983 



25 



It also reduces the size of the text screen by making the 
indicated point the upper left corner of the text window. All of 
the TYPE instructions to follow (including TS: instructions) will 
operate only within the window. This allows the author to lock 
part of the display on the screen while changing other parts. 
Of course the window can be reopened with another 
WINDOW operation. 

The BLOCK operation ("B") presents another way to 
selectively erase the screen. To use the BLOCK operation, we 
have to designate two points on the screen— two opposite 
corners of a block. The instruction: 

G:D100,65,B150,125 

will draw a block approximately in the center of the screen. 




The block can be drawn in any of four colors in either of 
two color sets. By making the block the same color as the 
screen's background, we have a way to selectively erase 
portions of the screen. Of course blocks can be used as 
components of graphics, in combination with the DOT, LINE, 
PENCOLOR, and ERASE operations that are available. 

Another very useful feature of Color PILOT is the 
NEWCHARACTER instruction ("N"). This instruction allows 
you to custom-design characters for special instructional pur- 
poses and/or for use in graphic designs. You can redefine 
ASCII characters 32 through 1 27, giving them any 8 x 8 dot 
pattern. For example, the instruction: 

N:32,FFFFFFFFFFFFFFFF 

changes the space (character 32 in the ASCII convention) 
into a solid black box. The dot pattern is specified by 1 6 Hex 
digits— in this case, we have turned all of the dots ON. After 
this instruction is encountered in a program, every space will 
appear as a black box. Patterns can also be defined for 
characters that are not provided by the keyboard. For exam- 
ple, the instruction: 

T:This is an example #127 

will produce character #1 27 after the other text even though 
character 127 does not correspond to a key. 




Now let's look at Color PILOT'S capabilities for process- 
ing student input. When the student responds to a question, 
his or her input is immediately transferred into a buffer. Vari- 
ous MATCH instructions can then be used to make the com- 
puter search the buffer for input that matches the specified 
range of acceptable answers. For example, the instruction: 

M:senate 

causes the computer to search the buffer for the answer 
"senate." ("M:senate" causes a window-string search, 
meaning that the answer "senate" will be found even if it 
appears in a sentence or in a group of words.) Color PILOT 
provides many extensions to the power of the MATCH opera- 
tion. The computer can be told to convert all student input 
either to upper case or to lower case before comparison (in 
the buffer only, not on the screen). The items to be matched 
can contain single wild-card characters (*); multiple wild-card 
characters (& can be used to join two required parts of an 
answer, with anything accepted in between these parts); and 
OR operators (!). The instruction: 

M:sen*t!h&se!leg*sl&t*r!repr*s&t&v 

would treat the answers "senate", "house", "legislature", 
and "representative" in a great variety of misspellings and 
mistypings as equivalent. The modified MATCH instruction: 

MS:senate 

would match any student answer which was only one charac- 
ter different from "senate" or which differed only by the 
switch of two characters. 

Of course we must be able to take different actions 
depending on the student answer. By using Y or N condi- 
tions, we can make the execution of any instruction depend 
on the results of a MATCH operation. The following is a very 
simple example: 

TS:Name the smaller of the 

: national legislative bodies. 

A: 

M:senate!Senate 

TY:That's right! 

TN:No, that's not right. _ ^ Q 9m 

a (Continued on page 28) 



26 



TRS-80 Microcomputer News, June 1983 



CompuServe 



Telidon: Graphic 
Future 



of the Near 



Editor's Note: The CompuServe Information Service is 
one of the largest information and entertainment services 
available to owners of personal computers and computer 
terminals. With each issue of TRS-80 Microcomputer News, 
various features of CompuServe will be discussed. The 
CompuServe Information Service is sold at Radio Shack 
stores nationwide and in Canada. 

An architect meeting with her clients uses it to take them 
on a visual tour of a building that is still on the drawing boards. 

A chemist uses it to create models for investigating the 
interaction of large molecules. 

A stockbroker gets an almost instantaneous graph of the 
performance of various stocks on which to base his financial 
judgments. 

These and many other examples in the fields of entertain- 
ment, medicine, business and education are all current uses 
of computer graphics— a science that has moved in the past 
few years from one of novelty to serious research. 

According to Larry Sturtz, manager of CompuServe's 
Advanced Research Department, new developments in 
computer graphics will continue to occur rapidly. "All this 
work will eventually benefit home computer owners," he 
says. "Initially, the software will be made available so that 
personal computer owners can use BASIC or FORTRAN 
programs to generate graphics. Later, computer products 
will be released featuring Telidon graphics and requiring no 
technical knowledge." 

In the forefront of computer graphics development 
is the Canadian Telidon Videotex system, a new terminal- 
independent method of creating high-resolution, 
multi-color graphic images through the use of Picture 
Description Instructions (PDIs). This PDI code describes im- 
ages in terms of commands to draw basic graphic shapes 
such as lines, arcs and polygons at specified positions in the 
overall picture. 

Sturtz, who is heading CompuServe's development of 
software to support the Presentation Level Protocol (PLP) 
which is a subset of the Telidon system, says that his group's 
work is a continually-evolving process. 

"I think we're close to the point where software will be 
available for use by "quasi-technical" people. We have one 
commercial customer in New York to whom we've supplied 
software for use with his own database," Sturtz explains. 

"Telidon is not widely used at this point," he adds, "but 
we believe— after evaluating other systems— that it's the one 
that will become the North American videotex standard." 

CompuServe's Advanced Research team displayed 
their work on Telidon graphics with a stock data demonstra- 
tion at Interface '82, a trade show held last March in Dallas. 
An entirely computer-generated program, the software re- 



quires no artist or information provider to draw pictures— a 
real plus in eventually making it available to the business 
person or home computer hobbyist. 

What the system does require at this point, however, is 
extremely skilled people to work with the Telidon software/ 
hardware combination during the graphics creation process. 
According to Charles Csuri, professor of Art Education and 
Computer Science at the Ohio State University, there is a 
"crying need" for software that will make computer graphics 
a viable option for business and home use. "The hardware 
will continue to go down in price," Csuri says, who is nation- 
ally known for his pioneering efforts in computer art. "The real 
deterrent is software— packages must be generated to solve 
very specific problems generated by users' needs." 

Sturtz agrees with Csuri's assessment of the state-of-the- 
art, adding that research on software for the Telidon graphics 
system and others is an ongoing priority at CompuServe. 

"We're working now on one of several graphics projects, 
to develop a multi-user interactive game that can be used by 
home computer hobbyists," he says, adding that develop- 
ments of this sort take months— even years— of research 
before they are ready for the public. 

Some synthetic images produced by computer graphics 
cannot readily by distinguished from pictures of real scenes. 
In pilot training, computer graphics are already being used as 
a safe, efficient method to present students with ground- 
based experience that mimics precisely the view from a 
cockpit. 

Use of computer graphics is also being experimented 
with as a means of eliminating the more tedious parts of 
cartoon animation. And instead of relying on artists to 
produce time-consuming and complicated charts, graphs 
and slides by hand, some businesses are relying on com- 
puter graphics to do the job. 

Sturtz and other researchers, who spend long days in 
the lab working to make image generation procedures effi- 
cient, agree that working to simplify these processes is one of 
the greatest challenges in computer graphics. 

OSU's Csuri predicts wide use of computer graphics as it 
moves from research labs into homes, offices and schools. 

"Computer graphics will alter how we work, learn 
and play," Csuri says. "Its impact on all our futures will be 
enormous." 

COLOR AND BLACK AND WHITE GRAPHICS 
AVAILABLE FOR STOCK DATA ON COMPUSERVE 

Color and Black and White graphics for stock data is now 
available on the CompuServe Information Service for the 
TRS-80 Color Computer, TRS-80 Videotex and the TRS-80 
Model I and III. 



TRS-80 Microcomputer News, June 1983 



27 



The microcomputer must be operating a CompuServe 
Vidtex-compatible executive program available through 
CompuServe. 

At the MicroQuote program prompt, one can enter the 
VIDPLT command by answering the three questions of ticker, 
time period (daily, weekly or monthly) and ending date re- 
ceive a graphic display of the high, low, close and volume on 
any stock. 

Seventeen periods of data are presented with each 
graphic. Each period of data will represent daily, weekly or 
monthly data according to the user's request. The cost is 15 
cents per graphic (1 7 periods per graphic) with no additional 
data charge. 

VIDPLT is an excellent means of viewing a stock's trend, 
especially for the home, amateur or small investor. 
CompuServe invites all users to view this graphics addition to 
the MicroQuote system which offers 10 years of daily infor- 
mation on over 42,000 financial instruments. 

VIDPLT is an additional graphics capability to Micro- 
Quote. Other similar capabilities are TELPLT which presents 
stock graphics for Telidon compatible microcomputers. 

MicroQuote is available under the Reference Database 
section of the Business and Financial Services or by entering 
GO FIN-20. 

CompuServe would like to express their thanks to Today 
magazine for permission to reprint the "Telidon: Graphics of 
the Near Future" story from the Sept./Oct. 1982 issue of 
Today. 

Questions and comments about the CompuServe Infor- 
mation Service can be sent to Richard A. Baker, Editorial 
Director, or Jacqueline A. Farthing, Assistant Editor, 
CompuServe Information Service, 5000 Arlington Centre 
Boulevard, P. 0. Box 20212, Columbus, Ohio 43220 or 
through Feedback, main menu item 5, CompuServe L/ser 
Information. 




Grid for the CGP-115 

Otis D. Sullivan 
Sullivan Studios Inc. 
212 Fifth Avenue 
New York, NY 10010 

This is a program that I wrote for the CGP-115 Color 
Graphics printer. The program (or subroutine) creates a grid 
that can be used to create charts. 

1 '*** GRID PROGRAM FOR THE CGP-115 COLOR GRAPHICS 

PRINTER *** 

2 '*** BY OTIS SULLIVAN 212 FIFTH AVENUE NEW YORK 

10010 *** 

3 '******************* SEPTEMBER 1982 

5 LPRINT"BILLIONS" 



: LPRINT"0F DOLLARS" 
10 LPRINT CHR$(18) 

: LPRINT"C0" 
20 LPRINT"L0" 
30 LPRINT"M25,0" 

: LPRINT"I" 
35 FOR A = TO 10 
40 LPRINT" J 399,0" 
50 LPRINT"R-399,-24" 
60 NEXT A 
70 LPRINT"H" 
80 LPRINT" J0, 240" 
90 LPRINT"R21,240" 

100 LPRINT"R-300,10" 

101 LPRINT"S0" 

105 LPRINT CHR$(173) 
110 LPRINT"100" 

LPRINT 

LPRINT" 90" 

LPRINT 

LPRINT" 80" 

LPRINT 

LPRINT" 70" 

LPRINT 

LPRINT" 60" 

LPRINT 

LPRINT" 50" 

LPRINT 

LPRINT" 40" 

LPRINT 

LPRINT" 30" 

LPRINT 

LPRINT" 20" 

LPRINT 

LPRINT" 10" 

LPRINT 

LPRINT" 0" 
120 LPRINT" '65 '67 '69 
■77 '79 '81 '83 



'71 



'73 



'75 



This program may be modified for the Color Computer 
by changing all LPRINTs to PRINT#-2„ ^1 



COLOR PILOT 



(From page 26) 



The line which starts a colon is the continuation of the 
TYPE instruction. The "A:" is an ACCEPT instruction which 
gets the student input. The MATCH allows for capitalization 
because we did not use the case editing feature. The opera- 
tions of the conditional TYPE instructions are obvious. The 
YES and NO conditions are just two of the many conditions 
that can be used. In fact any legal expression— either nu- 
meric, alphabetic, or mixed—can be attached to instructions 
as conditions. If the expression is true, the instruction will 
execute. If the expression is false, the instruction is skipped. 

We cannot completely describe Color PI LOT in this small 
space, so we have concentrated on those features which 
distinguish it from other languages. Color PILOT is a com- 
plete language with numeric and string variables, assign- 
ment instructions, branching instructions, and file access 
instructions. It is possible to write complex simulations as well 
as simple dialogs in the language. 

The Color PILOT package is available in two forms: a 
disk version for 32K which includes all of the above features, 
and a cassette version which includes a subset of these 
features and which runs on a 16K machine. Both systems 
include a simple line-oriented editor which makes creation 
and revision of programs extremely simple. Finally, in com- 
parison to other versions of PILOT, the system is extremely 
fast. Try it; you'll love it. ^B 



28 



TRS-80 Microcomputer News, June 1983 



Notes on Previous 
Newsletters 



JULY/AUGUST 1982 
Fireworks 



Gregg Ford 
95 Eldred Ave. 
Bedford, OH 44146 



I would like to suggest the following additions to the 
program submitted by Franklin Pigounias. These will liven up 
the program a little. 



31 SOUND 1 ,1 

32 FOR X=l to 200 

: NEXT X 
49 SOUND 200,1 
51 SOUND 210,1 
61 SOUND 220,1 
101 FOR X=l TO 100 

: NEXT X 
103 SOUND 1 ,2 
121 SOUND 75,2 
131 SOUND 130,3 
221 SOUND 1,1 

: SOUND 1 , 1 
301 SOUND 120,2 
309 SOUND 75,2 
311 SOUND 40,2 
319 SOUND 25,2 
321 SOUND 33,2 
499 SOUND 1 ,4 
531 SOUND 75,3 
541 SOUND 120,3 
551 SOUND 80,3 
561 SOUND 200,2 
571 SOUND 100,2 
581 SOUND 100,2 
591 SOUND 160,2 
601 FOR X=l TO 200 

: NEXT X 



NOVEMBER 1982 

Printing Titles 

William B. Innes 
724 Kilbourne Dr. 
Upland, CA 91786 

The program does not appear suitable for a LP VIII 
printer. The following program was worked out with TRS-80 
Level 2. 

10 INPUT "ENTER TITLE"; A$ 'EXAMPLE GIVEN ABOVE 

20 L=LEN(A$)' NUMBER OF SPACES IN A$ 

30 T=40 - INT (.5*L) 'SPACES ON LEFT OF TITLE TO CENTER 

FOR LP VIII PRINTER 
50 LPRINT TAB(T)A$' PRINTS TITLE AT CENTER POSITION 
60 FOR Y= T TO T+6*L 'THERE ARE 6 GRAPHICS PER SPACE 
70 LPRINT TAB(Y)CHR$(18);CHR$(129); 'PRINTS GRAPHIC AT 

Y 
80 NEXT Y' LOOP TO COMPLETE GRAPHIC PRINT UNDER TITLE 
85 LPRINT CHR$(30);"" ' CONVERTS GRAPHIC TO DATA 

PROC. MODE 



FEBRUARY 1983 

Periods to Commas in Data Statements 

Louis B. Kelley 
Route 1 Box 20-A 
Crescent City, FL 32012 

Regarding the program by Edward M. Roberts, I would 
suggest, for faster execution, changing FOR Z = 17129 TO 
VARPTR(Z) to read FOR Z = 271 29 TO VARPTR(Z). It is one 
of the most useful "tricks" I have used. 

Thanks from both of us, my Model III and me. 



Variable Swapping 

Dennis Lee Bieber 
1630 Ottawa Ct. Apt. C 
Sunnyvale, CA 94087 

The variable swapping routine by Steven Kaiser is ex- 
tremely wasteful. Only one temporary variable is needed. The 
same result can be obtained by deleting statement 30 and 
changing statement 40 to read "40 A = B". 

The routine which follows swaps two variables without 
using temporaries. (I am ignoring the dummy arguments in 
the DEF FN statement as it could be coded in-line.) FNX is an 
XOR (exclusive or) statement (a useful statement lacking in 
BASIC). 

10 DEF FNX(A,B)=(A AND NOT B) OR (NOT A AND B) 
20 INPUT "A,B";A,B 

30 PRINT 'THE NUMBERS TO BE EXCHANGED ARE ";A,B 
40 A=FNX(A,B) 

: B=FNX(A,B) 

: A=FNX(A,B) 
50 PRINT "THE EXCHANGED NUMBERS ARE ";A,B 
60 END 

MARCH 1983 

Resistor Color Code Interpreter 

Editor's Note: We sincerely apologize for the omission of 
the last ten lines of this program. The missing lines should 
read: 

600 IF D=ll THEN G=.01 
610 IF D=12 THEN G=.l 
620 RETURN 
630 END 
640 AQ="" 

: INPUT"4TH BAND ";AQ 
650 IF LEFT$(AQ,3)="SIL" THEN AB="10% TOLERANCE" 

: RETURN 
660 IF LEFT$(AQ,3)="GOL" THEN AB="5% TOLERANCE" 

: RETURN 
670 LET AB="20% TOLERANCE" 
680 RETURN 
690 END J^ 



TRS-80 Microcomputer News, June 1983 



29 



by Peter Levy 



One of the PC-2's more underrated (and less under- 
stood) functions is its automatic read— AREAD. 

The fundamental use of AREAD is simple. It reads what- 
ever is currently on the LCD display as data and assigns the 
resulting value to a specified variable. If the display contains 
"456.7" and AREAD X is executed, then a value of 456.7 is 
assigned to X. 

There are a couple of restrictions on AREAD's use. First, 
the PC-2 does NOT evaluate expressions during AREAD as it 
does for INPUT Whatever is read from the display must be 
useable to the PC-2 as-is. Hence, if a numeric variable is 
loaded through AREAD, the contents of the display must be 
numeric, such as 234.56. Expressions such as 3 + 4 or 
SQR(3) cannot be evaluated by AREAD and will result in the 
declaration of an error. 

Second, if AREAD is used, it must be the very first 
statement of a line; that line must be labeled; and the line must 
have been reached by entry of a DEF-key. 

The following program will demonstrate AREAD's 
application: 

10 PRINT "ENTER NUMBER, PRESS DEF-A" 

20 END 

30 "A" AREAD X 

40 PRINT "VALUE READ =";X 

50 END 

Note that the AREAD statement is the very first statement 
in its line (30); that line 30 is labelled ("A"); and that the 
program flow is designed so that line 30 is reached by its 
DEF-key label CdefI (aD- These conditions all must be met 
for AREAD to be used. 

Not let's examine what happens when this program 
runs, and so learn exactly what goes on when AREAD is 

used, r , 

First, ENTER NUMBER, PRESS DEF-A is displayed. 
After displaying this the PC-2 stops running the program and 
waits for the user to tell it that he's through reading the 
display, which he normally does by pressing CEBXOD or a 
DEF-key. 

At this point, a numeric value is typed. Let's type in 
32 1 74. As soon as the user starts pressing keys the display is 
automatically cleared, and then the PC-2 echoes the new 
keystrokes on the display as they are received. We wind up 
with 32.174 on the display, plus a cursor. The PC-2 is still 
waiting for permission to go ahead after its PRINT, since 
neither CenTFED or a DEF-key has been pressed. 

Now we press CEEB, then CAD- The PC-2 jumps to the 
line labelled "A" and starts executing that line, which instructs 
it to AREAD X. The PC-2 does this by reading the characters 
on the display— which still holds the 32.174 previously 
typed— and assigning that value to the variable X. 

Now the program tells us what was read: 

VALUE READ = 32.174. 



AREAD is generally used where a routine needs data on 
entry, and, for one reason or another, it isn't practical to 
transmit that value in a variable. 

Suppose you have a program which can perform a large 
number of different operations— say a geometry application. 
You use DEF-key labels to get to the various routines easily. 
Now it turns out that each routine doesn't necessarily use the 
same variables— likely enough, especially if some are to use 
the results of others. It's pretty clumsy to use, say, INPUT X at 
one point, then start each and every routine with U = X or 
A = X or Y = X or whatever conversion is needed. The situa- 
tion gets still worse if some functions want a string value and 
others a numeric one. 

The solution is to use AREAD at the start of each routine: 
AREAD X, AREAD B$, or whatever. Now all you have to do is 
type the value and then press the needed DEF-key. Handy, 
isn't it? *^& 

AgrlStar (From page 19) 

SUMMARY 

Charting is not a Utopia in price forecasting. It is a strate- 
gic tool for any agribusinessman in his overall marketing 
program to be used in conjunction with other fundamental 
information available on Agri-Star. And, as with any tool, its 
usefulness depends on knowing how to use it and knowing its 
capabilities and limitations. With the aid of other information 
on charting, an agribusinessman can improve his 
decision-making performance. He will have the knowledge 
necessary to know when to buy and when to sell his commo- 
dities profitably. 

Such information available includes: 

1 . Top Farmer Strategy (TFS) reports issued 
daily on Agri-Star. These reports give: 

a. A summary of the dominant factors 
affecting the market by individual 
commodity and by commodity groupings; 

b. A technical summary of the charts— 
their meaning and the future price outlook; 

c. An overall summary which gives a price 
outlook and why; and 

d. Recommendations of when to buy and sell 
and what to look for in the near future. 

2. Access to Agri-Star HELP screens; and 

3. "Charting Farm Markets," a Top Farmers 
of American Publication. 

For more information about Agri-Star, a business infor- 
mation service of AgriData Resources, Inc., call toll free 
1-800-558-9044 (Wisconsin residents call 1-800-242-6001) 
or write Warren Clark, Marketing Manager, AgriData Re- 
sources, Inc., 205 W. Highland Ave., Milwaukee, W I 53203 



30 



TRS-80 Microcomputer News, June 1983 



Greek Flag 

H.E. Boulware 

4516 St. Andrew Lane 

Bridgeton, MO 63044 



This program for the PC-2 with printer/plotter attached 
draws a Greek flag. 

5 "GREECE"CLEAR 
10 GRAPH 

: GLCURSOR (10,0) 

: COLOR 1 

: LINE (10,0)-(200,0) 
20 LINE (200,-0)-(200,-135)-(10,-135)-(10,0) 

: GLCURSOR (40,0) 

: LINE (40,0)-(40,-30) 
30 LINE (40,-30) - (10,-30) - (10,-45) - (40,-45) - 

(40,-75) - (55,-75) - (55,-45) 
40 LINE (55,-45) - (85,-45) - (85,-30) - (55,-30) - 

(55,0) 

: GLCURSOR (10,-134) 
50 LINE (10,-134) - (200,-134) - (200,-133) - 

(10,-133) - (10,-132) - (200,-132) - (200,-131) 
60 LINE (200,-131) - (10,-131) - (10,-130) - 

(200,-130) - (200,-129) - (10,-129) - (10,-128) 
70 LINE (10,-128) - (200,-128) - (200,-127) - 

(10,-127) - (10,-126) - (200,-126) - (200,-125) 
80 LINE (200,-125) - (10,-125) - (10,-124) - 

(200,-124) - (200,-123) - (10,-123) - (10,-122) 
90 LINE (10,-122) - (200,-122) - (200,-121) - 

(10,-121) - (10,-120) 
100 LINE (10,-120) - (10,-105) - (200,-105) - 

(200,-104) - (10,-104) - (10,-103) - (200,-103) 
110 LINE (200,-103) - (10,-103) - (10,-102) - 

(200,-102) - (200,-101) - (10,-101) - (10,-100) 
120 LINE (10,-100) - (200,-100) - (200,-99) - 

(10,-99) - (10,-98) - (200,-98) - (200,-97) 
130 LINE (200,-97) - (10,-97) - (10,-96) - (200,-96) 

- (200,-95) - (10,-95) - (10,-94) 

140 LINE (10,-94) - (200,-94) - (200,-93) - (10,-93) 

- (10,-92) - (200,-92) - (200,-91) 

150 LINE (200,-91) - (10,-91) - (10,-90) - (200,-90) 

- (200,-75) - (10,-75) - (10,-74) 
160 GLCURSOR (55,-74) 

: LINE (55,-74) - (200,-74) - (200,-73) - 
(55,-73) - (55,-72) 
170 LINE (55,-72) - (200,-72) - (200,-71) - (55,-71) 

- (55,-70) - (200,-70) - (200,-69) 

180 LINE (200,-69) - (55,-69) - (55,-68) - (200,-68) 

- (200,-67) - (55,-67) - (55,-66) 

190 LINE (55,-66) - (200,-66) - (200,-65) - (55,-65) 

- (55,-64) - (200,-64) - (200,-63) 

200 LINE (200,-63) - (55,-63) - (55,-62) - (200,-62) 

- (200,-61) - (55,-61) - (55,-60) 
210 LINE (55,-60) - (200,-60) 

: GLCURSOR (55,-59) 
220 LINE (55,-59) - (85,-59) - (85,-58) - (55,-58) - 

(55,-57) - (85,-57) - (85,-56) 
230 LINE (85,-56) - (55,-56) - (55,-55) - (85,-55) - 

(85,-54) - (55,-54) - (55,-53) 
240 LINE (55,-53) - (85,-53) - (85,-52) - (55,-52) - 

(55,-51) - (85,-51) - (85,-50) 
250 LINE (85,-50) - (55,-50) - (55,-49) - (85,-49) - 

(85,-48) - (55,-48) - (55,-47) 
260 LINE (55,-47) - (85,-47) - (85,-46) - (55,-46) - 

(55,-45) - (200,-45) - (200,-44) 
270 LINE (200,-44) - (85,-44) - (85,-43) - (200,-43) 

- (200,-42) - (85,-42) - (85,-41) 

280 LINE (85,-41) - (200,-41) - (200,-40) - (85,-40) 

- (85,-39) - (200,-39) - (200,-38) 

290 LINE (200,-38) - (85,-38) - (85,-37) - (200,-37) 

- (200,-36) - (85,-36) - (85,-35) 



300 LINE (85,-35) - (200,-35) - (200,-34) - (85,-34) 

- (85,-33) - (200,-33) - (200,-32) 

310 LINE (200,-32) - (85,-32) - (85,-31) - (200,-31) 

- (200,-30) - (85,-30) - (85,-29) 

320 LINE (55,-29) - (85,-29) - (85,-28) - (55,-28) - 

(55,-27) - (85,-27) - (85,-26) 
330 LINE (85,-26) - (55,-26) - (55,-25) - (85,-25) - 

(85,-24) - (55,-24) - (55,-23) 
340 LINE (55,-23) - (85,-23) - (85,-22) - (55,-22) - 

(55,-21) - (85,-21) - (85,-20) 
350 LINE (85,-20) - (55,-20) - (55,-19) - (85,-19) - 

(85,-18) - (55,-18) - (55,-17) 
360 LINE (55,-17) - (85,-17) - (85,-16) - (55,-16) - 

(55,-15) - (200,-15) - (200,-14) 
370 LINE (200,-14) - (55,-14) - (55,-13) - (200,-13) 

- (200,-12) - (55,-12) - (55,-11) 

380 LINE (55,-11) - (200,-11) - (200,-10) - (55,-10) 

- (55,-9) - (200,-9) - (200,-8) 

390 LINE (200,-8) - (55,-8) - (55,-7) - (200 -7) - 

(200,-6) - (55,-6) - (55,-5) 
400 LINE (55,-5) - (200,-5) - (200,-4) - (55,-4) - 

(55,-3) - (200,-3) - (200,-2) 
410 LINE (200,-2) - (55,-2) - (55,-1) - (200,-1) 
420 GLCURSOR (10,-75) 

: LINE (10,-75) - (40,-75) - (40,-74) - (10,-74) 

- (10,-73) 

430 LINE (10,-73) - (40,-73) - (40,-72) - (10,-72) - 

(10,-71) - (40,-71) - (40,-70) 
440 LINE (40,-70) - (10,-70) - (10,-69) - (40,-69) - 

(40,-68) - (10,-68) - (10,-67) 
450 LINE (10,-67) - (40,-67) - (40,-66) - (10,-66) - 

(10,-65) - (40,-65) - (40,-64) 
460 LINE (40,-64) - (10,-64) - (10,-63) - (40,-63) - 

(40,-62) - (10,-62) - (10,-61) 
470 LINE (10,-61) - (40,-61) - (40,-60) - (10 -60) - 

(10,-59) - (40,-59) 
480 LINE (40,-58) - (10,-58) - (10,-57) - (40,-57) - 

(40,-56) - (10,-56) - (10,-55) 
490 LINE (10, - 55) - (40,-55) - (40,-54) - (10,-54) 

- (10,-53) - (40,-53) - (40,-52) 

500 LINE (40,-52) - (10,-52) - (10,-51) - (40 -51) - 

(40,-50) - (10,-50) - (10,-49) 
510 LINE (10,-49) - (40,-49) - (40,-48) - (10 -48) - 

(10,-47) - (40,-47) - (40,-46) 

520 LINE (40,-46) - (10,-46) - (10,-45) 

521 GLCURSOR (40,-29) 

522 LINE (40,-29) - (10,-29) - (10,-28) 

(40,-27) - (10,-27) - (10,-26) 
540 LINE (10,-26) - (40,-26) - (40,-25) 

(10,-24) - (40,-24) - (40,-23) 
550 LINE (40,-23) - (10,-23) - (10,-22) - (40,-22) 

(40,-21) - (10,-21) - (10,-20) 
560 LINE (10,-20) - (40,-20) - (40,-19) - (10 -19) 

(10,-18) - (40,-18) - (40,-17) 
570 LINE (40,-17) - (10,-17) - (10,-16) - (40,-16) 

(40,-15) - (10,-15) - (10,-14) 
580 LINE (10,-14) - (40,-14) - (40,-13) - (10,-13) 

(10,-12) - (40,-12) - (40,-11) 
590 LINE (40,-11) - (10,-11) - (10,-10) - (40,-10) 

(40,-9) - (10,-9) - (10,-8) 
600 LINE (10,-8) - (40,-8) - (40,-7) - (10 -7) - 

(10,-6) - (40,-6) - (40,-5) 
610 LINE (40,-5) - (10,-5) - (10,-4) - (40,-4) - 

(40,-3) - (10,-3) - (40,-2) 

620 LINE (10,-2) - (40,-2) - (40,-1) - (10,-1) - 

(10,0) 

621 COLOR 

622 GLCURSOR (5,5) 

: LINE (5,5) - (5,-270) - (0,-270) - (0,5) - 

(5,5) 
630 TEXT 

: CSIZE 2 

: LF 10 

: LPRINT " FLAG OF GREECE" 
640 TEXT 

: LF 5 



(40,-45) 
(40,-28) - 
(10,-25) - 



TRS-80 Microcomputer News, June 1983 



31 



Document Listing for 
the Model II 

Jean-Pierre Radley 
320 Central Park West 
New York, NY 10025 

This program was written in interpreter BASIC and will list 
a BASIC program which has been saved in the normal format 
(not ASCII) in an attractive format. 

REM D0CLIST3/BAS Based on Lewis Rosenfelder , "Basic 

Faster & Better & Other Mysteries". Version 
September 1982 by Jean-Pierre Radley, 320 
C.P.W., N.Y. 10025. Includes, in array format, 
assembly language for four USR calls. 

1 CLEAR 10000 

: DEFINT A-Y 
: DEFSTR Z 

3 DIM B(1),RW$(128),US(45) 

4 ZZ = CHR$(26)+" " 

: ZY = " "+CHR$(25) 
: ZX = CHR$(24) 

10 ? DEF FN DT$ = MID$(DATE$ , 1 , 3)+" "+MID$(DATE$ ,4 , 3)+" 
"+MID$(DATE$,7,2)+" "+MID$(DATE$ ,9 ,4)+" @ 
"+TIME$ 

15 CLS 

• PRINT@85,"D0CLIST3/BAS will list in a 
"CHR$(34)"pretty-printing"CHR$(34)" format any 
BASIC program. The program must be on disk in 
normal format (i.e., not in ASCII format). 

16 PR INT 

• PRINT"This program modifies the BASIC 
interpreter by replacing the 0CT$ function by 
PEEK, and the NAME function by POKE. Re-enterinj 
BASIC from TRSDOS READY will restore normal 
BASIC operation. 

20 ON ERROR GOTO 1150 

CLOSE 

0PEN"D" , 2 , "DOCLIST3/BAS" 

ON ERROR GOTO 

CLOSE 
30 GOSUB 5000 

50 PRINT@960, "Loading reserved words..."; 

51 X = 10323 

Y = 
C = 

DEF USR6 = VARPTR(US(32)) 
REM peek routine starts at element 32 of 

US()52 C = USR6(X) 

IF C > 127 THEN PRINT@992 ,Y ,RW$(Y) , 

Y = Y + l 
IF Y > 128 THEN 55 ELSE RW$(Y) = CHR$(C AND 

NOT 128) 
: GOTO 54 
53 RW$(Y) = RW$(Y)+CHR$(C) 



54 X = X+l 

: GOTO 52 

55 RW$(13) = RW$(13)+" " : 

REM make "IF" 4 characters 

56 RW$(2) = RW$(2)+" " : 

REM make "FOR" 4 characters 
100 GOSUB 1000 
110 GOSUB 1100 
120 GOSUB 1200 
130 CLS 

: PRINT PN$ 
140 GOSUB 2100 
150 PN = 1 

: GOSUB 3000 



long 
long 



"5 if INSTR(OP$,"P") - THEN LPRINT STRING$(2 12) 
171 IF INSTR(0P$,"D") THEN PRINT#2 ,STRING$(255 ,0) 

180 CLOSE 

: PRINT"Press "ZZ"<Fl>"ZY" for another run, 
"ZZ"<F2>"ZY" to end..." 

A$ = INPUT$(1) 

IF A$ = CHR$(D THEN CLS 

GOTO 100 ELSE IF A$ = CHR$(2) THEN PRINT 
TAB(130) "Thanks" 
: END 

: ELSE 180 
1000 REM Initialize simple variables 

1010 C = 

P = 
BP = 
PC = 
LN$ = "" 
VB = 
NF = 
FF = 
NT = 
FX$ = "" 
QF = 

11 = 5 

12 = 5 
FL! =0 
TL! = 65536 
RN = 1 

1020 RETURN 

1100 REM Enter program name, open and field program 

file 

1110 PRINT@320,ZX "What is the name of the program to 

be listed ? "; 

1111 LINEINPUT PN$ 

1112 ON ERROR GOTO 1140 
CLOSE 

OPEN"I",l,PN$ 
CLOSE 

0PEN"D",1 ,PN$ 
ON ERROR GOTO 

1115 J = 

: DEFUSR6 = VARPTR(US(0)) 

: REM poke routine starts at element of US() 
and is fed Addr.Byte. If reassembling, note that 
USR6 address (2B36) is specifically referenced 
in the routine 

1120 FIELD 1,128 AS B$(0),127 AS B$(l) 

: J = USR6(VARPTR(B$(1))) OR USR6(128) 

1130 RETURN 

1140 IF ERR = 54 THEN RESUME NEXT ELSE GOSUB 1150 

: RESUME 1100 

1150 REM Handling errors resulting from opening 
program files 

1151 PRINT 
PRINT 
PRINT 
IF ERR = 53 THEN PRINT "File not found' ELSE 

IF ERR = 52 THEN PRINT "Bad file number - 
re-entering BASIC with -F:2" 

: CLOSE 

: SYSTEM"BASIC D0CLIST3/BAS -F:2" ELSE 
PRINT"Error "ZZ;ERR;ZY" in Line "ZZ;ERL;ZY 
1152 PRINT"Press any key...";A$ = INPUT$(1) 

: RETURN 
1200 REM Select options 
1205 CLS 

: PRINT@(2,27),CHR$(26)" "PN$" "CHR$(25) 
1210 PRINT@400,ZZ"R"ZY" Line number 

range";TAB(40)ZZ"W"ZY" Page width <> 

80";TAB(160)ZZ"S"ZY" Stop after each 

page";TAB(40)ZZ"D"ZY" Output to 

disk";TAB(160)ZZ"H"ZY" Special page 

heading" ;TAB(40)ZZ"P"ZY" No output to printer 
1215 PRINT STRlNG$(2,13)"Type (in any order) the 

letters corresponding to the options you want, 



32 TRS-80 Microcomputer News, June 1983 



1220 
1230 

1231 
1232 
1240 

1241 



1242 
1250 

1251 
1260 

1261 



1262 
1270 
2000 
2010 



2020 

2100 
2110 

2120 
2200 

2210 



2220 
3000 
3010 
3020 

3030 



3100 
3110 

3115 
3120 

3125 
3130 
3140 

3150 

3160 



3200 
3210 
3211 

3212 
3220 



3230 



if any, and "ZZ"<£NTER>"ZY 

: PRINT 

LINEINPUT 0P$ 

IF INSTR(OP$,"R") = THEN 1240 ELSE 

PRINT@1280,CHR$(24); 

INPUT"From line ";FL! 

INPUT" To line ";TL! 

IF INSTR(OP$,"D") = THEN 1250 ELSE 

PRINT@1440,CHR$(24); 

LINEINPUT"Output disk file name: ";A$ 

: IF A$ = PN$ THEN PRINT® 1491 ."Cannot use "PN$ 

: GOTO 1241 

OPEN "0",2,A$ 

IF INSTR(OP$,"W") = THEN 1260 ELSE 

PRINT<ai520,ZX; 

INPUT"page width ";PW 

IF INSTR(OP$,"H") = THEN 1270 ELSE 

PRINT(§1600,ZX 

PRINT"Enter the page heading (up 

to"PW"characters):" 

: LINEINPUT PH$ 

PH$ = SPACE$((PW-LEN(PH$))\2)+PH$ 

RETURN 

REM Get next byte from disk file - return as C% 

P = P+l 

IF P < 129 THEN 2020 ELSE P = 1 
BP = BP+1 

IF BP < 2 THEN 2020 ELSE BP = 
GOSUB 2100 
C = ASC(MID$(B$(BP),P)) 
: RETURN 

REM Get next record from disk file 
GET 1,RN 
: RN = RN+1 
RETURN 

REM Get next 2 bytes from disk file - return as 
A! 

GOSUB 2000 
PC = C 
GOSUB 2000 

A! = CVI(CHR$(PC)+CHR$(C)) 
IF A! < THEN A! = 65536+A! 
RETURN 

REM Prepare printer 
IF INSTR(OP$,"P") THEN RETURN 
PW$ = "FORMS W = "+STR$(PW) 
: SYSTEM PW$ 
J = 

: DEFUSR6 = VARPTR(US(42)) 
: J = USR6(0) 

: REM routine starting at element 42 of US() 
will set line count to zero 
REM Print page heading 
IF INSTR(OP$,"P") THEN RETURN 
ON ERROR GOTO 3160 

ZS = STRING$((PW-35-LEN(PN$))\2,32) 
: LPRINT CHR$(34)PN$CHR$(34)ZS FNDT$ZS"page"PN 
ON ERROR GOTO 

IF INSTR(OP$,"H") THEN LPRINT PH$ 
LPRINT STRING$(PW,"=") 
: LPRINT" " 
PN = PN+1 
: RETURN 

PRINT"Error"ZZ;ERR;ZY"in line"ZZ;ERL;ZY". Are 
you sure the printer is ready?" 
: ZQ = INPUT$(1) 
: RESUME 3020 
REM Print a line of text 
PRINT LN$ 

IF INSTR(OP$,"P") = THEN LPRINT LN$; 
: GOSUB 4400 

IF INSTR(OP$,"D") THEN PRINT#2,LN$; 
IF INSTR(" 128 138 139 143 158 165 171 183 
",STRS(VB)) = OR (PC <> 58 AND C <> 0) THEN 
3240 
IF FF + NF = THEN 3235 ELSE NT = NT+1 



3231 IF INSTR(OP$,"P") = THEN LPRINT" 
"STRING$(PW-LEN(LN$)-2,".") ; 

: GOSUB 4400 

3232 IF INSTR(OP$,"D") THEN PRINT#2," 
"STRING$(PW-LEN(LN$)-2 ,"."); 

3233 IF (C = 0) AND (NT/2 <> INT(NT/2)) THEN 3235 
ELSE 3240 

3235 IF INSTR(OP$,"P") = THEN LPRINT" " 
: GOSUB 4400 

: LPRINT STRING$(PW-1,"-"); 
: GOSUB 4400 

3236 IF INSTR(OP$,"D") THEN PRINT#2," " 
: PRINT#2,STRING$(PW-1,"-"); 

3240 IF INSTR(OP$,"P") = THEN LPRINT" " 
: GOSUB 4400 

3241 IF INSTR(OP$,' , D") THEN PRINT#2," " 
3250 LN$ = STRING$(6+NF+FF," ") 

: RETURN 
3300 REM Test on print- line length - print if filled 
3310 IF LEN(LN$)+6 < PW THEN RETURN ELSE GOSUB 3200 

: RETURN 
4000 REM Process the text 
4010 GOSUB 2200 

: IF A! = THEN 4040 
4020 GOSUB 2200 

: IF A! < FL! THEN PRINT A! 
: GOSUB 4300 

: GOTO 4010 ELSE IF A! > TL! THEN 4040 
4030 GOSUB 4100 

: GOSUB 3200 
: GOTO 4010 
4040 FF = 

NF = 
C = 1 

GOSUB 3200 
RETURN 
4100 REM Process a line 
4110 QF = 

FF = 

FX$ = "" 

C = 

VB = 

NT = 

4120 LN$ = RIGHT$(" "+STR$(A! ) , 5)+" 

"+STRING$(NF," ") 
4130 PC = C 

: GOSUB 2000 
: IF C = THEN RETURN 
4135 IF C = 146 THEN GOSUB 3200 

MID$(LN$,LEN(LN$)-4,4) = "ELSE" 
VB = 138 

IF FX$ = "ELSE" THEN LN$ = MID$(LN$ , 1 1 + 1 ) 
FF = (FF-I1)*-(IK=FF) 
GOTO 4130 ELSE FX$ = "ELSE" 
GOTO 4130 
4140 IF PC = 58 AND QF = AND VB <> THEN GOSUB 

3200 
4150 IF C > 127 THEN 4180 

4160 IF C = 34 THEN QF = NOT QF 

4161 IF (C =10 AND QF = 0) OR (C = 32 AND QF = 0) 
THEN 4130 

4162 IF C = 10 THEN GOSUB 3200 
: GOTO 4130 

4170 LN$ = LN$+CHR$(C) 

: GOSUB 3300 

: GOTO 4130 
4180 REM Process reserved word 
4182 IF C = 199 THEN GOSUB 3200 

: MID$(LN$,LEN(LN$)-4,4) = "THEN" 

: VB = 138 

: GOTO 4130 
4184 IF C = 132 AND FX$ = "" THEN 

MID$(LN$,LEN(LN$)-4,4) = "NEXT" 

: NF = (NF-I2)*-(I2<=NF) 

: GOTO 4130 
4186 IF C = 140 THEN FF = FF + II 

: NT = NT+1 



TRS-80 Microcomputer News, June 1983 



33 



: FX$ = "IF" 
4188 IF C = 129 THEN NF = NF+I2 
4190 IF C = 144 THEN QF = -2 

IF PC = 58 THEN MID$(LN$ ,LEN(LN$) , 1 )=" '" 
GOSUB 3300 
. GOTO 4130 

4200 IF RIGHT$(LN$,1) <> " " THEN LN$ = LN$+" " 

4201 LN$ = LN$+RW$(C-127)+" " 
: GOSUB 3300 

4210 IF C = 138 AND VB = 157 THEN VB = -1 
: GOTO 4130 ELSE VB = C 
: GOTO 4130 
4300 REM Read to end of text line - ignoring contents 
4310 GOSUB 2000 

: IF C = THEN RETURN 
4320 P = INSTR(P,B$(BP),CHR$(0)) 
IF P > THEN C = 
RETURN ELSE P = 128 
GOTO 4310 

4400 REM End of page routine 

4401 DEFUSR6 = VARPTR(US(37 ) ) 
: J = USR6C0) 

: REM routine starting at element 37 of USOwill 
return in J the # of lines printed since last 
top-of-form 

4402 IF J <> THEN RETURN ELSE IF INSTR(OP$ , "S") 
THEN PRINT 

: PRINT"Press "ZZ"Fl"ZY" to continue, "ZZ"F2"ZY" 

to stop. . . " 

A$ = INPUT$(1) 

IF A$ = CHR$(2) THEN CLOSE 

END ELSE IF A$ <> CHR$(1) THEN 4402 

4403 GOSUB 3100 
: RETURN 

5000 REM Magic array for peeking, poking, counting 
number of lines since last top-of-page on the 
printer, setting this count to zero 

5010 FOR X = TO 45 
: READ US(X) 
: NEXT 

5020 DATA 24013, -8892, 13866, -8917, 12405, 29917, 
-8911, 2356 

5021 DATA 13533, -8951, 3124, 13533, -8948, 2430, 
12294, -8816 

5022 DATA 12102, 10384, -14079, 14045, 12297, 14045, 
12556, 1048 

5023 DATA 11264, 65, 28381, -8912, 12646, 32477, 

30514, 201 

5024 DATA 24013, 28228, 38, 31427, 68, 24382, 6, 9935 

5025 DATA -15616, 17530, 24382, 1, -12541, 201 

5030 RETURN ^ 



A Tribute to Columbia 



Arnold E. van Beverhoudt, Jr. 

P.O. Box 56 

St. Thomas, V.I. 00801 



In November 1982, the space shuttle began its opera- 
tional flights, opening up space for practical use. The space 
shuttle is a great achievement of which I, as an American and 
a supporter of NASA and the space program, am proud. My 
program is a tribute to the men and women of NASA 
and to the space shuttle, particularly the first one to fly, 
"Columbia." The program also shows the kind of detailed 
graphics that are possible on the "low resolution" Models I 
and III. A Tribute to Columbia also includes a screen 
print routine which shows off the capabilities of the 
Line Printer VII. 



100 

110 



120 



130 

140 
150 
160 
170 



VAN BEVERHOUDT, JR. 



I am the proud owner of a 48K Model I with one disk and 
an LP VII. The good old Model I has stood up great to almost 
three years of daily use by my wife, my 5-year old daughter, 
and myself. It is an important practical, educational, and 
recreational part of our household. 

The BASIC program, as shown, requires 32K to run. 
However, 1 6K users can have the graphic displays by delet- 
ing the narrative descriptions in lines 350-1 150, the screen- 
print routine in lines 39999-50000, the GOSUB 40000 in lines 
295, 325, 345, and all REM statements. 

10 REM *********************************** 

***** A TRIBUTE TO 'COLUMBIA' ***** 

************ (1982) BY ************ 
** ARNOLD E. VAN BEVERHOUDT, JR. ** 

*********************************** 
REM ***** INITIALIZATION ROUTINES ***** 

CLEAR 500 
DIMH$(15) 
CLS 

PRINT CHR$(23) 
PRINT 
PRINT 
PRINT 
PRINT TAB(5);"A TRIBUTE TO 'COLUMBIA'" 

PRINT 
PRINT 
PRINT 

PRINT TAB(15);"BY" 
PRINT 
PRINT 
PRINT 
PRINT TAB(2); "ARNOLD E. 
: FOR T = 1 TO 1000 
• NEXT T 
H$(l) = CHR$(131) + CHR$(179) + CHR$(159) 

: H$(2) = STRING$(2,140) + CHR$(143) 
H$(3) = CHR$(131) + CHR$(179) + CHR$(159) 

: H$(4) = CHR$(143) + CHR$(141) + CHR$(140) 
H$(5) = CHR$(142) + CHR$(191) 

: H$(6) = CHR$(128) + CHR$(143) 
H$(7) = CHR$(191) + STRING$(4,128) + CHR$(131) + 
CHR$(191) + CHR$(131) + CHR$(128) + CHR$(191) + 
STRING$(3,179) + CHR$(131) + CHR$(128) + 
STRING$(2,131) + CHR$(191) + STRING$(2 , 131 ) + 
CHR$(128) + STRING$(3,176) _ nN 

H$(8) = CHR$(143) + STRING$(3,140) + CHR$(128) + 
CHR$(140) + CHR$(143) + CHR$(140) + CHR$(128) + 
CHR$(143) + STRING$(7,128) + CHR$(143) 
H$(9) = CHR$(191) + STRING$(3,131) + CHR$(191) + 
CHR$(128) + CHR$(191) + STRING$(3, 179) + 
CHR$(131) + CHR$(128) + CHR$(191) + 
STRING$(3,179) + CHR$(131) 
H$(10) = CHR$(143) + STRING$(3,140) + CHR$(143) + 
CHR$(128) + CHR$(143) + STRING$(5 , 128) + 
CHR$(143) 
H$(ll) = STRING$(6,149) + STRING$(3 , 128) + 

STRING$(6,170) 
H$(12) = STRING$(2,131) + CHR$(191) + 
STRING$(2,131) + CHR$(128) + CHR$(191) + 
STRING$(3,131) + CHR$(191) + CHR$(128) + 
CHR$(191) + STRING$(3,128) + CHR$(191) + 
CHR$(128) + CHR$(191) + STRING$(4 , 131 ) + 
CHR$(128) + CHR$(191) + STRING$(3 , 176) + 
CHR$(191) + CHR$(128) + CHR$(191) 
H$(13) = CHR$(131) + CHR$(139) + CHR$(180) + 
CHR$(128) + CHR$(19D + STRING$(3 , 131 ) + 
CHR$(191) + CHR$(128) + CHR$(191) + CHR$(128) + 
CHR$(188) + CHR$(128) + CHR$(191) + CHR$(128) + 
STRING$(2,191) + CHR$(176) + CHR$(128) + 
CHR$(191) + STRING$(2,128) + CHR$(191) 
H$(14) = CHR$(143) + STRING$(3,128) * CHR$(143) + 
STRING$(3,140) + CHR$(143) + CHR$(128) + 
CHR$(143) + STRING$(3,140) + CHR$(143) + 



190 

200 

210 
220 



230 



240 



34 



TRS-80 Microcomputer News, June 1983 



CHR$(128) + CHR$(143) + STRING$(4 , 140) + 
CHR$(128) + CHR$(143) + STRING$(3, 128) + 
CHR$(143) + CHR$(128) + CHR$(143) + CHR$(140) + 
CHR$(142) + CHR$(129) 
250 H$(15) = CHR$(128) + CHR$(143) + STRING$( 3 , 140 ) - 
CHR$(143) + CHR$(128) + CHR$(143) + CHR$(131) + 
CHR$(128) + CHR$(131) + CHR$(143) + CHR$(128) + 
CHR$(143) + CHR$(128) + CHR$(131) + 
STRING$(2,143) + STRING$(2 , 128) + CHR$(140) 
255 REM ***** PRINT GRAPHICS ROUTINES ***** 
260 RESTORE 
CLS 

FOR T = 15360 TO 16383 
READ G 
POKE T,G 
NEXT T 

FOR T = 1 TO 1500 
NEXT T 
270 PRINT@67,H$(1); 

PRINT<ai31,H$(2); 
FOR T = 1 TO 500 
NEXT T 

PRINT@200,H$(3); 
PRINT@264,H$(4); 
280 FOR T = 1 TO 500 
NEXT T 

PRINT@333,H$(5); 
PRINT@397,H$(6); 
FOR T = 1 TO 500 
NEXT T 
290 PRINT@513,H$(7); 

PRINT@577,H$(8); 
PR1NT@644,H$(9); 
PRINT@708,H$(10); 
FOR T = 1 TO 1000 
NEXT T 
295 FOR T = 1 TO 1000 
: GOSUB 40000 
: NEXT T 
300 FOR T = TO 14 

: PRINT@0 + 64 * T, STRINGS(25 , 128) ; 
: NEXT T 
310 PRINTL3960,""; 

FOR T = 1 TO 10 
PRINT TAB(33);H$(11) 
FOR TT = 1 TO 100 
NEXT TT 
NEXT T 

FOR T =1 TO 20 
PRINT 

FOR TT = 1 TO 100 
NEXT TT 
NEXT T 

320 FOR T = 15360 TO 16383 
READ G 
POKE T,G 
NEXT T 

PRINT@30,"» IN ORBIT «"; 
325 FOR T = 1 TO 1000 
: GOSUB 40000 
: NEXT T 
330 CLS 

FOR T = 15360 TO 16383 

READ G 

POKE T,G 

NEXT T 

FOR T = 1 TO 1000 

NEXT T 

340 PRINT@69,H$(12);H$(13); 

: PRINT@135,H$(14);H$(15); 
345 FOR T = 1 TO 1000 

: GOSUB 40000 

: NEXT T 
350 REM ***** PRINT NARRATIVE ROUTINE ***** 
360 CLS 

: PRINTTAB(16) ;"*** A TRIBUTE TO 'COLUMBIA' ***" 
: PRINT 



370 
380 
390 
400 
410 
420 
430 
440 
450 

460 
470 
480 

490 

500 
510 
520 
530 
540 
550 
560 
570 
580 
590 
600 
610 
620 
630 

640 

650 
660 
670 
680 
690 
700 
710 
720 



PRINT"THIS SHORT GRAPHIC PROGRAM IS A TRIBUTE TO 

N.A.S.A. AND THE" 
PRINT"SPACE SHUTTLE - IN PARTICULAR THE 

'COLUMBIA', THE FIRST SHUTTLE" 
PRINT" TO FLY." 

: PRINT 

PRINT'THE OBJECTIVES OF THE SPACE SHUTTLE PROGRAM 

ARE : " 
PRINT"- TO ESTABLISH A NATIONAL SPACE 

TRANSPORTATION PROGRAM THAT" 
PRINT" WILL SUBSTANTIALLY REDUCE THE COST OF 

SPACE OPERATIONS." 
PRINT"- TO PROVIDE A CAPABILITY TO SUPPORT A WIDE 

RANGE OF SCIENTIFIC" 
PRINT" APPLICATIONS & COMMERCIAL, DEFENSE, & 

INTERNATIONAL USES." 
PRINT 
: PRINT"THE SPACE SHUTTLE IS COMPOSED OF THREE 
BASIC ELEMENTS:" 
PRINT TAB(5);"- THE SHUTTLE ORBITER (122 FT. LONG 

- 78 FT. WINGSPAN)" 
PRINTTAB(5);"~ AN EXTERNAL FUEL TANK (1.6 MILLION 

LBS. CAPACITY)" 
PRINTTAB(5);"~ TWO SOLID ROCKET BOOSTERS (2.6 
MILLION LBS. THRUST EACH)"; 
: GOSUB 50000 
CLS 
: PRINT"THE SPACE SHUTTLE IS THE WORLD'S FIRST 
REUSABLE SPACECRAFT." 
PRINT" IT IS LAUNCHED INTO SPACE AS A CONVENTIONAL 

ROCKET, AND RETURNS" 
PRINT"TO EARTH AND LANDS LIKE AN AIRPLANE. DURING 

REGULAR FLIGHTS," 
PRINT"THE SHUTTLE WILL BE LAUNCHED FROM THE SAME 

LAUNCH PADS AT THE" 
PRINT"KENNEDY SPACE CENTER IN FLORIDA THAT 

LAUNCHED THE APOLLO SPACE-" 
PRINT"CRAFTS, AND IT WILL LAND ON A 3-MILE LONE 

CONCRETE RUNWAY AT" 
PRINT"THE KENNEDY SPACE CENTER. SOME MILITARY 

FLIGHTS OF THE SPACE" 
PRINT"SHUTTLE WILL BEGIN AND END AT A NEW SPACE 

CENTER AT VANDENBERG" 
PRINT"AIR FORCE BASE IN CALIFORNIA. THE 

VANDENBERG LAUNCH SITE WILL" 
PRINT"ALLOW FLIGHT INTO ORBITS WITH A HIGHER 

INCLINATION THAN KENNEDY" 
PRINT"SPACE CENTER LAUNCHES." 

: PRINT 
PRINT"IN ITS CARGO BAY, THE SHUTTLE CAN CARRY 

PAYLOADS OF UP TO" 
PRINT"65,000 LBS. AND 60 FT. LONG. A 

REMOTE-CONTROLLED ARM IN THE" 
PRINT"CARGO BAY WILL BE USED TO REMOVE AND 

REPLACE SATELLITES AND" 
PRINT"OTHER EXPERIMENT PACKAGES TAKEN INTO 
SPACE."; 
: GOSUB 50000 
CLS 
: PRINT"ON SOME MISSIONS OF THE SPACE SHUTTLE, 
IT WILL CARRY A SPACE" 
PRINT"LABORATORY, SIMILAR TO SKYLAB , IN ITS CARGO 

BAY. THIS LAB IS" 
PRINT"BUILT BY THE EUROPEAN SPACE AGENCY 

(E.S.A.), AND CREWS OF UP TO" 
PRINT"SIX ASTRONAUTS (AMERICAN AND EUROPEAN) WILL 

CARRY OUT EXPERI-" 
PRINT"MENTS FOR UP TO TWO WEEKS IN DURATION." 

: PRINT 
PRINT"THE SPACE SHUTTLE WILL ALSO BE USED TO 

CARRY MANY SCIENTIFIC," 
PRINT"DEFENSE, COMMUNICATIONS, AND WEATHER 

SATELLITES INTO ORBIT." 
PRINT"IT WILL ALSO RETRIEVE BROKEN SATELLITES AND 

BRING THEM BACK TO" 
PRINT"EARTH FOR REPAIR AND RE-LAUNCH." 
: PRINT 



TRS-80 Microcomputer News, June 1983 



35 



730 PRINT"IN ALL, THERE WILL BE FIVE SPACE SHUTTLES 

BUILT:" 
740 PRINT"' ENTERPRISE' — USED FOR LANDING TESTS; 

WILL NOT GO INTO SPACE" 
750 PRINT" 'COLUMBIA' ~ THE FIRST SHUTTLE TO 

ACTUALLY FLY IN SPACE" 
760 PRINT 1 " CHALLENGER' 'DISCOVERY' 

' ATLANTIS * " ; 
: GOSUB 50000 
770 CLS 

: PRINT TAB( 20); "SPACE SHUTTLE FLIGHT LOG" 
: PRINT 
780 PRINT"** ENTERPRISE **" 

: PRINT 
790 PRINT" 6/18/77 FIRST MANNED FLIGHT ATTACHED TO 

THE TOP OF A 747" 
800 PRINT" ASTRONAUTS FRED HAISE & GORDON 

FULLERTON" 
810 PRINT" 6/28/7 7 SECOND MANNED FLIGHT ATTACHED TO 

THE TOP OF A 747" 
820 PRINT" ASTRONAUTS JOE ENGLE & RICHARD 

TRULY" 

: PRINT _ A 

830 PRINT" 8/12/77 FIRST MANNED FREE FLIGHT TO A 

LANDING AT EDWARDS AFB" 
840 PRINT" ASTRONAUTS FRED HAISE & GORDON 

FULLERTON" 
850 PRINT" 8/30/7 7 SECOND MANNED FREE FLIGHT TO A 

LANDING AT EDWARDS AFB" 
860 PRINT" ASTRONAUTS JOE ENGLE & RICHARD 

TRULY" 
870 PRINT" 9/16/77 THIRD MANNED FREE FLIGHT TO A 

LANDING AT EDWARDS AFB" 
880 PRINT" ASTRONAUTS FRED HAISE & GORDON 

FULLERTON" ; 

: GOSUB 50000 

89 CLS PRINT TAB(20);"SPACE SHUTTLE FLIGHT LOG" 
PRINT 

PRINT"** ENTERPRISE ** (CONT'D)" 
PRINT 
900 PRINT"10/13/77 FOURTH MANNED FREE FLIGHT TO A 

LANDING AT EDWARDS AFB" 
910 PRINT" ASTRONAUTS JOE ENGLE & RICHARD 

TRULY" 
920 PRINT" 10/26/7 7 LAST MANNED FREE FLIGHT TO A 

LANDING AT EDWARDS AFB" 
930 PRINT" ASTRONAUTS FRED HAISE & GORDON 

FULLERTON" 
940 PRINT 

: PRINT 

: PRINT"THE 'ENTERPRISE' WAS LATER USED IN 

STRESS AND VIBRATION TESTS"; 

: GOSUB 50000 

950 CLS 

: PRINTTAB( 20); "SPACE SHUTTLE FLIGHT LOG' 

: PRINT 
960 PRINT"** COLUMBIA **" 

• PRINT 

970 PRINT" 4/12/81 STS-1 FIRST ORBITAL TEST - NO 

PAYLOAD" 
980 PRINT" 2 DAYS 6 HRS. 22 MIN. - 36 

ORBITS" 
990 PRINT" LANDED AT EDWARDS AFB, CA" 

1000 PRINT" ASTRONAUTS JOHN YOUNG & ROBERT 

CRIPPEN" 

• PRINT 

1010 PRINT-11/12/81 STS-2 SECOND ORBITAL TEST - 

OSTA-1 EXPERIMENTS" 
1020 PRINT" 2 DAYS 6 HRS. 13 MIN. - 36 

ORBITS" 
1030 PRINT" LANDED 2 DAYS EARLY AT EDWARDS 

AFB, CA" 
1040 PRINT" ASTRONAUTS JOE ENGLE & RICHARD 

TRULY"; 

: GOSUB 50000 



1050 CLS 

: PRINT TAB( 20); "SPACE SHUTTLE FLIGHT LOG 

• PRINT 
1060 PRINT"** COLUMBIA ** (CONT'D)" 

: PRINT 
1070 PRINT" 3/22/82 STS-3 THIRD ORBITAL TEST - 

OSS-1 EXPERIMENTS" 
1080 PRINT" 8 DAYS 4 MIN. - 159 ORBITS' 

1090 PRINT" LANDED 1 DAY LATE AT WHITE SANDS 

MISSILE RANGE, NM" 
1100 PRINT" ASTRONAUTS JACK LOUSMA & GORDON 

FULLERTON" 
. PRINT 
1110 PRINT" 6/27/82 STS-4 LAST ORBITAL TEST - DOD 

82-1 EXPERIMENTS" 
1120 PRINT" 7 DAYS 1 HR. 9 MIN. - 112 

ORBITS" 
1130 PRINT" LANDED ON CONCRETE RUNWAY AT 

EDWARDS AFB, CA" 
1140 PRINT" ASTRONAUTS TOM MATTINGLY & HENRY 

HARTSFIELD" ; 
: GOSUB 50000 
1150 CLS 

PRINT CHR$(23) 

PRINT 

PRINT 

PRINT 

PRINT TAB(6);"MORE FLIGHTS TO COME" 

1160 FOR T = 1 TO 1500 
: NEXT T 
: GOTO 260 




10000 REM ***** 
10010 DATA 128, 
128, 128, 
128, 128, 
128, 128, 
128, 128, 

10015 DATA 152, 
128, 128, 
128, 128, 

10020 DATA 128, 
128, 128, 
128, 128, 
128, 128, 
128, 160, 

10025 DATA 190, 
128, 128, 
128, 128, 

10030 DATA 128, 
128, 128, 
128, 128, 
128, 128, 
160, 133, 



LIFT-OFF 

128, 128, 
128, 128, 
128, 128, 
128, 128, 
128 

166, 17 2 
128, 128, 
128, 128, 

128, 128 
128, 128, 
128, 128, 
128, 128, 
166 

191, 170 
128, 128, 
128, 128, 

128, 128 
128, 128, 
128, 128, 
128, 128, 
191 



GRAPHICS ***** 

128, 128, 128, 
128, 128, 128, 
128, 128, 128, 
128, 128, 128, 

, 153, 164, 128, 
128, 128, 128, 
128, 128, 128, 

, 128, 128, 128 
128, 128, 128, 
128, 128, 128, 
128, 128, 128, 

, 191, 189, 153 
128, 128, 128, 
128, 128, 128, 

, 128, 128, 128 
128, 128, 128, 
128, 128, 128, 
128, 128, 128, 



128, 128, 
128, 128, 
128, 128, 
128, 128, 

128, 128, 
128, 128, 
128, 128 
, 128, 128, 
128, 128, 
128, 128, 
128, 128, 

, 144, 128, 
128, 128, 
128, 128 

, 128, 128, 
128, 128, 
128, 128, 
128, 128, 



36 



TRS-80 Microcomputer News, June 1983 



10035 DATA 191, 191 
144, 128, 128, 
128, 128, 128, 

10040 DATA 128,128, 
128, 128, 128, 
128, 128, 128, 
128, 128, 128, 
185, 149, 191 

10045 DATA 191, 191 
182, 164, 128, 
128, 128, 128, 

10050 DATA 128, 128 
128, 128, 128, 
128, 128, 128, 

128, 128, 128, 

129, 129, 191 
10055 DATa 191, 191 

191, 170, 128, 
128, 128, 128, 

10060 DATA 128, 128 
128, 128, 128, 
128, 128, 128, 
128, 128, 128, 
191, 149, 130 

10065 DATA 175, 191 
191, 170, 128, 
128, 128, 128, 

10070 DATA 128, 128 
128, 128, 128, 
128, 128, 128, 
128, 128, 128, 
175, 191 

10075 DATA 138, 191. 
191, 170, 128, 
128, 128, 128, 

10080 DATA 128, 128, 
128, 128, 128, 
128, 128, 128, 
128, 128, 128, 
191, 170, 191 

10085 DATA 128, 191, 
191, 170, 128, 
128, 128, 128, 

10090 DATA 128, 128, 
128, 128, 128, 
128, 128, 128, 
128, 128, 128, 
170,191,191,170 

10095 DATA 128, 170, 
191, 170, 128, 
128, 128, 128, 

10100 DATA 128, 128, 
128, 128, 128, 
128, 128, 128, 
128, 128, 128, 
191, 170, 191 

10105 DATA 128, 128, 
191, 170, 128, 
128, 128, 128, 

10110 DATA 128,128, 
128, 128, 128, 
128, 128, 128, 
128, 128, 128, 
191, 170, 191 

10115 DATA 170, 191, 
191, 170, 128, 
128, 128, 128, 

10120 DATA 128, 128, 
128, 128, 128, 
128, 128, 128, 
128, 160, 140, 
143, 170, 191 

10125 DATA 170, 191, 
191, 170, 128, 
128, 128, 128, 

10130 DATA 128, 128, 



, 170, 191, 191, 191, 138, 153, 

128, 128, 128, 128, 128, 128, 

128, 128, 128, 128, 128, 128 

128, 128, 128, 128, 128, 128, 

128, 128, 128, 128, 128, 128, 

128, 128, 128, 128, 128, 128, 

128, 128, 128, 128, 128, 152, 

, 170, 191, 191, 167, 190, 191, 
128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128 

, 128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 170, 154, 

, 170, 191, 191, 170, 191, 191, 
128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128 

, 128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128, 
128, 128, 128, 152, 137, 143, 

, 170, 191, 191, 170, 191, 191, 
128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128 

, 128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128,128 ; 
128, 128, 128, 128, 128, 128, 
128, 150, 142, 139, 139, 142, 

, 170, 191, 191, 170, 191, 191, 
128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128 

, 128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128, 
128, 128, 149, 191, 170, 191, 

170, 191, 191, 170, 191, 191, 
128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128 

128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128, 
128, 128, 149, 191, 
i,191 

170, 191, 191, 170, 191, 191, 
128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128 

128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128, 
128, 128, 149, 191, 170, 191, 



170, 191, 191, 170, 191, 191, 

128, 128, 128, 128, 128, 128, 

128, 128, 128, 128, 128, 128 

128, 128, 128, 128, 128, 128, 

128, 128, 128, 128, 128, 128, 

128, 128, 128, 128, 128, 128, 

128, 176, 133, 191, 170, 191, 

180, 147, 143, 170, 181, 186, 
128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128 

128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128, 
179, 188, 149, 143, 138, 143, 

191, 191, 189, 180, 139, 191, 
128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128 

128, 128, 128, 128, 128, 128, 



128, 128, 128, 128, 128, 128, 128, 128 ,128, 
128, 128, 128, 128, 128, 128, 128, 128, 128, 
160, 133, 143, 175, 143, 185, 191, 170, 191, 
191, 149, 191 

10135 DATA 130, 179, 163, 179, 179, 179, 128, 187 
191, 170, 128, 128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128, 128, 128, 128 

10140 DATA 128, 128, 128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128, 128, 128, 128, 
154, 178, 147, 164, 185, 148, 151, 140, 188, 
164, 177, 175 

10145 DATA 189, 163, 140, 140, 172, 168, 191, 191, 
191, 170, 128, 128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128, 128, 128, 128 

10150 DATA 128, 128, 128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128, 128, 128, 128, 
149, 167, 178, 153, 140, 140, 174, 165, 176, 
177, 176, 177 

10155 DATA 172, 129, 128, 128, 154, 178, 176, 176, 
176, 154, 144, 128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128, 128, 128, 128 

10160 DATA 128, 128, 128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128, 128, 128, 128, 

130, 129, 128, 128, 128, 128, 133, 147, 147, 
147, 147, 147 

10165 DATA 145, 133, 128, 138, 162, 163, 163, 163, 
163, 163, 138, 128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128, 128, 128, 128 

20000 REM ***** in ORBIT GRAPHICS ***** 

20010 DATA 191, 191, 191, 191, 191, 191, 191, 191, 
191, 191, 191, 191, 191, 191, 191, 191, 188, 
176, 144, 128, 128, 128, 128, 129, 128, 128, 
128, 128, 128, 128, 128, 128, 128, 128, 128, 
128, 128, 128 

20015 DATA 128, 128, 128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128, 128, 128, 128 

20020 DATA 191, 191, 191, 191, 191, 191, 191, 191, 
191, 191, 191, 191, 191, 191, 191, 191, 191, 
191, 191, 191, 188, 176, 128, 186, 135, 131, 

131, 131, 131, 131, 131, 131, 131, 131, 131, 
143, 188, 176 

20025 DATA 128, 128, 128, 128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 129, 160, 176, 176, 
176, 176, 176, 176, 128, 128, 128, 128, 129 

20030 DATA 191, 191, 191, 191, 191, 191, 191, 159, 
143, 179, 179, 179, 188, 179, 143, 191, 191, 
191, 191, 191, 191, 191, 191, 188, 188, 176, 
128, 128, 128, 128, 128, 129, 128, 128, 128, 
128, 128, 131 

20035 DATA 143, 188, 176, 128, 128, 128, 129, 128, 
176, 140, 179, 147, 179, 163, 177, 140, 188, 

188, 184, 140, 172, 147, 137, 140, 164, 128 
20040 DATA 191, 191, 191, 191, 191, 191, 191, 191, 

180, 131, 188, 182, 143, 191, 191, 188, 179, 
143, 191, 191, 191, 191, 191, 191, 191, 191, 
191, 189, 188, 176, 128, 128, 128, 128, 128, 
128, 176, 176 

20045 DATA 140, 140, 131, 143, 188, 176, 140, 142, 
135, 168, 191, 191, 191, 191, 159, 133, 176, 
191, 191, 188, 143, 143, 129, 128, 160, 133 

20050 DATA 191, 191, 191, 191, 191, 191, 191, 191, 
191, 181, 138, 191, 191, 176, 143, 191, 191, 
191, 176, 143, 191, 191, 191, 191, 191, 191, 
191, 191, 191, 191, 191, 132, 140, 179, 179, 
179, 188, 188 

20055 DATA 191, 191, 143, 143, 176, 179, 188, 191, 

189, 188, 140, 176, 176, 188, 188, 180, 139, 
191, 191, 149, 128, 128, 160, 140, 129, 128 

20060 DATA 191, 191, 191, 191, 191, 191, 191, 191, 
191, 191, 189, 146, 175, 191, 143, 128, 175, 
191, 191, 191, 188, 179, 143, 191, 191, 143, 
179, 179, 188, 188, 188, 191, 191, 143, 143, 



TRS-80 Microcomputer News, June 1983 



37 



179, 179, 179 
20065 DATA 188, 188 
188, 188, 191, 
140, 167, 153, 
20070 DATA 191, 191 
191, 159, 135, 
191, 143, 143, 
179, 143, 143, 
143, 143, 179 
20075 DATA 179 , 188 
143, 179, 179, 
131, 129, 128, 
20080 DATA 179, 179 
129, 142, 129, 
188, 147, 163, 
191, 191, 149, 
191, 191, 191 
20085 DATA 191, 143 
191, 191, 191, 

128, 128, 128, 
20090 DATA 188, 188 

143, 191, 180, 
148, 136, 140, 
191, 191, 149, 
179, 179, 188 
20095 DATA 188, 191 
191, 191, 129, 

129, 128, 128, 
20100 DATA 188, 182 

128, 128, 136, 
179, 155,143, 
143, 133, 170, 
191, 170 

20105 DATA 149, 
191, 191, 
128, 128, 

20110 DATA 191, 
128, 128, 
143, 143, 
179, 131, 
191, 191, 

20115 DATA 177, 
191, 191, 
128, 128, 

20120 DATA 191, 
140, 172, 
191, 191, 
188, 191, 
143, 191, 

20125 DATA 191 

191, 191, 

128, 128, 

20130 DATA 191 

191, 189, 

179, 185, 
143, 191, 
188, 188, 

20135 DATA 179 
191, 191, 
128, 128, 

20140 DATA 191 
191, 191, 
191, 191, 
191, 188, 
143, 143, 

20145 DATA 191 
143, 143, 

180, 128, 
20150 DATA 191 

191, 191, 
191, 191, 
191, 191, 
191, 191, 
20155 DATA 188 
188, 191, 
191, 189, 



191, 143, 143, 179, 179, 179 
191, 191, 143, 143, 179, 177, 
140, 134, 129, 128, 128, 128 

191, 191, 191, 191, 191, 191 
145, 128, 140, 143, 143, 143, 
179, 179, 188, 188, 188, 179, 
179 1 188, 188, 188, 191, 191, 



20160 DATA 191,191, 191, 191, 191, 191, 191, 191, 

191, 191, 191, 191, 191, 191, 191, 191, 191, 

191, 191, 191, 191, 191, 191, 191, 191, 191, 

191 191, 191, 191, 191, 191, 191, 191, 191, 



, 188, 191, 191, 191, 191 
188, 188, 191, 143, 179, 
128, 128, 128, 128, 128, 128 

, 179, 179, 179, 179, 179, 147, 
128, 128, 130, 175, 191, 191, 
139, 191, 191, 191, 191, 191, 
138, 143, 179, 179, 188 ; 



, 143, 
140, 



II 



143, 179, 179, 188, 188, 191, 
' 143, 167, 153, 134, 129, 128, 
L28, 128, 129, 128, 128, 128 
, 188, 179, 179, 179, 179, 147, 
128, 128. 128, 178, 179, 179, 
140, 191, 191, 191, 191, 191, 
170, 188, 179, 155, 143, 143, 

191, 191, 191, 191, 191, 191, 
' 150, 129, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 128 

179, 147, 131, 185, 156, 128, 
'l88, 140, 128, 128, 130, 179, 
128, 191, 191, 191, 191, 143, 143, 
191, 143, 179, 188, 191, 191, 



191 

128, 

128, 
191 

128, 

179, 

131, 

178 
191 

128, 

128, 
191, 

191, 

191, 

191, 

191 

, 191, 
128, 
128, 

,191, 
188, 
188, 
191, 
188 

, 179 ; 
128, 
128, 

, 191 
191, 
191, 
188, 
191 

, 190 
176, 
128, 

, 191 
191, 
191, 
191, 
188 

, 188 
191, 
180, 



163, 179, 191, 143, 143, 191, 
149, 128, 128, 128, 128, 128, 
128, 128, 128, 129, 128, 128 

191. 191, 191, 188, 143, 128, 
133, 128, 128, 128, 128, 138, 

176, 179, 179, 140, 140, 179, 
188, 188, 191, 191, 191, 191, 

140, 132. 191, 162, 145, 191, 

177, 128, 128, 128, 129, 128, 
128, 128, 128, 128, 128, 128 

191, 191, 191, 191, 182, 143, 
191, 188, 176, 128, 128, 184, 
143, 179, 188, 191, 143, 131, 
188, 188, 188, 179, 179, 143, 

, 191, 191, 191, 190, 189, 191 
191, 191, 180, 144, 128, 128, 
128, 128, 128, 128, 128, 128 

, 191, 191, 191, 191, 191, 191 
188, 182, 179, 179, 179, 179, 
191, 191, 191, 17 6, 143, 143, 
191, 191, 191, 143, 135, 179, 



143, 143, 191, 191, 191, 191, 
191, 191, 191, 191, 180, 144, 
128, 128, 128, 128, 128, 128 

191, 191, 191, 191, 191, 191, 
191, 191, 191, 191, 191, 191, 
191, 191, 191, 191, 191, 191, 
188, 179, 176, 179, 179, 143, 

, 191, 191, 188, 188, 179, 179 
191, 191, 191, 191, 191, 191, 
128, 129, 128, 128, 128, 128 

, 191, 191, 191, 191, 191, 191 
191, 191, 191, 191, 191, 191, 
191, 191, 191, 191, 191, 191, 
191, 191, 191, 191 , 191, 191, 

179, 179, 179, 179, 143, 179 
' 191 , 191, 191, 191, 191, 191, 
128, 128, 128, 128, 128, 128 



191, 191, 191 
20165 DATA 191, 191, 191 
191, 191, 191, 191, 
191, 191, 191, 1 



191, 191, 191, 191, 191, 
191, 191, 191, 191, 191, 
89, 144, 128, 128, 128, 128 










30000 REM ***** TOUCHDOWN 
30010 DATA 128, 128, 128, 
128, 128, 128, 128, 
128, 128, 128, 128, 
128, 128, 128, 128, 
128, 128, 128 
30015 DATA 128, 128, 128, 
128, 128, 128, 128, 
128, 128, 128, 128, 
30020 DATA 128, 128, 128, 
128, 128, 128, 128, 
128, 128, 128, 128, 
128, 128, 128, 128, 
128, 128, 128 
30025 DATA 128, 128, 128, 
128, 128, 128, 128, 
128,128,128,128,128, 
30030 DATA 128. 128, 128, 
128, 128, 128, 128, 
128, 128, 128, 128, 
128, 128, 128, 128, 
128, 128, 128 
30035 DATA 128, 128, 128, 
128, 128, 128, 128, 
128, 128, 128, 128, 
30040 DATA 128, 128, 128, 
128, 128, 128, 128, 
128, 128, 128, 128, 
128, 128, 128, 128, 
128, 128, 128 
30045 DATA 128, 128, 128, 
128, 128, 128, 128, 
128, 128, 128, 128, 
30050 DATA 128, 128, 128, 
128, 128, 128, 128, 
128, 128, 128, 128, 
128, 128, 128, 128, 
128, 128, 128 
30055 DATA 128, 128, 128 
128, 128, 128, 128, 
128, 128, 128, 128, 
DATA 128, 128, 128 
128, 128, 128, 128, 
128, 128, 128, 128, 
128, 128, 128, 128, 
128, 128, 128 



GRAPHICS ***** 

128, 128, 128, 128 

128, 128, 128, 128, 

128, 128, 128, 128, 

128, 128, 128, 128, 



, 128, 
128, 
128, 
128, 

, 128, 
128, 
128 

, 128, 
128, 
128, 
128, 

128, 



128, 128, 128, 128 
128, 128, 128, 128, 
128, 128, 128, 128, 

128, 128, 128, 128 
128, 128, 128, 128, 
128, 128, 128, 128, 
128, 128, 128, 128, 

128, 128, 128, 128 . 
128, 128, 128, 128, 
128,128,128,128,128 

128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 

128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 
128, 128, 128, 128, 128 

128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 

128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 
128, 128, 128, 128, 128 

128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 

128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 
128, 128, 128, 128, 128 

128, 128, 128, 128, 128 
128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 
128, 128, 128, 128, 128, 



TRS- 



licrocomputer News, June 1983 



30065 DATA 12£ 


, 128 


, 128 


, 128 


, 128 


, 128 


, 128 


, 128, 


176, 176, 176, 176, 176, 176, 176, 176 176 


128, 128, 


128, 


128, 


128, 


128, 


128, 


128, 


128, 


176, 176, 176, 176, 176, 176, 176, 176, 176^ 


128, 128, 


128, 


128, 


128, 


128, 


128, 


128, 


128 


176, 178, 188, 188, 188, 177, 176, 176, 176, 


30070 DATA 128 


, 128 


, 128 


, 128 


, 128 


, 128 


, 128 


, 128, 


176, 176, 178 


128, 128, 


128, 


128, 


128, 


128, 


128, 


128, 


128, 


30165 DATA 188, 188, 188, 177, 176, 176, 176 176 


128, 128, 


128, 


128, 


128, 


128, 


128, 


128, 


128, 


176, 176, 176, 176, 176, 176, 176, 176, 176,' 


128, 128, 


128, 


128, 


128, 


128, 


128, 


128, 


128, 


176, 176, 176, 176, 176, 176, 176, 176, 176 


128, 128, 


128 














39999 REM ***** SCREEN-PRINT ROUTINE ***** 


3007 5 DATA 128 


, 128 


, 128 


, 128 


, 128 


, 128 


, 128 


, 128, 


40000 PRINT@55, "<P>RINT"; 


128, 128, 


160, 


152, 


140, 


140, 


140, 


140, 


164, 


: IF INKEY$ = "P" THEN GOTO 40010 ELSE RETURN 


128, 128, 


128, 


128, 


128, 


128, 


128, 


128, 


128 


40010 FOR X = TO 127 


30080 DATA 128 


, 128 


, 128 


, 128 


, 128 


, 128 


, 128 


, 128, 


: RESET(X.0) 


128, 128, 


128, 


128, 


128, 


128, 


128, 


128, 


128, 




: RESET(X,47) 


128, 128, 


128, 


128, 


128, 


128, 


128, 


128, 


128, 




: NEXT X 


128, 128, 


128, 


128, 


128, 


128, 


128, 


128, 


128, 


40020 FOR Y = TO 47 


128, 128, 


128 
















: RESET(0,Y) 


30085 DATA 128 


, 128 


, 128 


, 128 


, 128 


, 128 


, 128 


, 160, 




: RESET(127,Y) 


152, 166, 


185, 


190, 


191, 


167, 


179, 


143, 


185, 




NEXT Y 


129, 128, 


128, 


128, 


128, 


128, 


128, 


128, 


128 


40030 POKE 16424,66 


30090 DATA 128 


, 128 


, 128 


, 128 


, 128 


, 128 


, 128 


, 128, 


: POKE 16425,1 


128, 128, 


128, 


176, 


176, 


176, 


176, 


176, 


176, 


40040 FOR Y = TO 47 


176, 176, 


176, 


128, 


128, 


128, 


128, 


128, 


128, 


40050 LPRINT CHR$(30) ;TAB(10) ; 


128, 128, 


128, 


128, 


128, 


128, 


128, 


128, 


128, 


40060 FOR X = TO 127 


128, 128, 


128 














40070 IF POINT(X,Y) » -1 THEN LPRINT 


30095 DATA 128 


, 128 


, 128 


, 128 


, 160 


, 152 


, 166 


, 185, 


CHR$(18);CHR$(28);CHR$(3 


190, 191, 


143, 


179, 


188, 


191, 


167, 


134, 


128, 


40080 NEXT X 


128, 128, 


128, 


128, 


128, 


128, 


128, 


128, 


128 


: LPRINT CHR$(13); 


30100 DATA 128 


, 128 


, 128 


, 128 


, 128 


, 128 


, 128 


, 160, 


: NEXT Y 


140, 140, 


179, 


140, 


160, 


188, 


140, 


176, 


188, 


40090 LPRINT CHR$(30); 


188, 188, 


188, 


179, 


179, 


179, 


179, 


179, 


140, 


: LPRINT CHR$(11) 


140, 140, 


140, 


140, 


140, 


176, 


176, 


176, 


176, 


40100 RETURN 


176, 176, 


128 














50000 Z$ = INKEY$ 


30105 DATA 128 


, 176 


, 152 


, 166 


, 185 


, 190 


, 191 


, 191, 


IF Z$ = "" THEN PRINT@1022, ">"; 


159, 137, 


175, 


191, 


159, 


185, 


129, 


128, 


128, 




FOR T = 1 TO 50 


128, 128, 


128, 


128, 


128, 


128, 


128, 


128, 


128 




NEXT T 


30110 DATA 128 


, 128 


, 128 


, 128 


, 128 


, 152 


, 134 


, 129, 




PRINT@1022, " "; 


143, 143, 


179, 


147, 


191, 


128, 


143, 


143, 


143, 




FOR T = 1 TO 50 


143, 191, 


191, 


191, 


191, 


191, 


191, 


191, 


191, 




NEXT T 


191, 191, 


191, 


191, 


191, 


188, 


188, 


188, 


188, 




GOTO 50000 ELSE RETURN J3 


188, 188, 


131 
















30115 DATA 179 


, 176 


, 178 


, 179 


, 147 


, 163 


, 179 


, 179, 




131, 131, 


129, 


128, 


136, 


172, 


137, 


140, 


144, 


^^ . j0^n ■ 


128, 128, 


128, 


128, 


128, 


128, 


128, 


128, 


128 


Computer Clubs 


30120 DATA 128 


, 128 


128 


128 


128 


137 


144 


128, 


^^^^i ■ ik^%* »V'H WIUMM 


128, 128, 


141, 


133, 


143, 


143, 


143, 


191, 


191, 




189, 188, 
179, 179, 


188, 
179, 


188, 
179, 


188, 
147, 


188, 

143, 


180, 
143, 


179, 
143, 


179, 
143, 


NUTMEG POCKET COMPUTER GUILD 


135, 180, 


139 














c/o Len Smith 


30125 DATA 191 


191 


191 


191 


189 


150 


188 


180, 


3 Barn Hill Rd. 


139, 143, 


132, 


128, 


128, 


160, 


191, 


191, 


170, 


Bloomfield, CT 06002 


128, 128, 
30130 DATA 128 


128, 
128 


128, 
128 


128, 
128 


128, 
128 


128, 
128 


128, 
130 


128 
131, 


1-203-242-9515 


172, 133, 
176, 176, 


175, 
176, 


140, 
176, 


140, 
128, 


140, 
128, 


140, 
128, 


140, 
131, 


176, 
179, 


QUAD CITY COCO CLUB 
c/o John Greve 


179, 179, 


179, 


143, 


143, 


143, 


191, 


191, 


191, 


191, 191, 


191 














4211 Seventh Ave. 


30135 DATA 188 


188 


188 


148 


140 


176 


179 


179, 


Rock Island, IL 61201 


132, 128, 


130, 


171, 


132, 


131, 


131, 


136, 


141, 


1-309-786-8187 


140, 140, 


140, 


140, 


176, 


176, 


128, 


128, 


128 




30140 DATA 128 
128, 131, 


128 
129, 


128, 
128, 


128 
128, 


128 
128, 


128, 
128, 


128, 
128, 


128, 
128, 


TUG-DC/TRS-80 USER'S GROUP OF DELAWARE 

COUNTY 

c/o Gary Diillio 


128, 128, 


128, 


128, 


131, 


131, 


171, 


130, 


131, 


143, 143, 


143, 


143, 


143, 


143, 


140, 


188, 


188, 


179, 179, 


143 














1109 Madison Ave. 


30145 DATA 131, 


179, 


179, 


177, 


155, 


188, 


188, 


188, 


Prospect Park, PA 1 9076 


177, 176, 


176, 


180, 


172, 


188, 


188, 


146, 


143, 




143, 143, 


143, 


143, 


140, 


140, 


153, 


128, 


128 


TUSCARAWAS COUNTY PERSONAL COMPUTER CLUB 


30150 DATA 128, 


128, 


128, 


128, 


128, 


128, 


128, 


128, 


c/o Robert D. Hobart 


128, 128, 
128, 128, 
140, 176, 


128, 
128, 
136, 


128, 
128, 
133, 


128, 
128, 
143, 


128, 
128, 
147, 


128, 
130, 
131, 


128, 
140, 
140, 


128, 
140, 
140, 


231 Fifth Drive NW 

New Philadelphia, OH 44663 


140, 140, 
30155 DATA 140, 
140, 140, 


172 

132, 
140, 


140, 
140, 


156, 
140, 


140, 
140, 


140, 
140, 


140, 
134, 


140, 
131, 


VECTECH COMPCLUB 
c/o Sal War man n 


131, 131, 


131, 


131, 


131, 


131, 


128, 


128, 


128 


15362 Fairlane Dr. 


30160 DATA 176, 


176, 


176, 


176, 


176, 


176, 


176, 


176, 


Livonia, Ml 48154 ^| 



TRS-80 Microcomputer News, June 1983 



39 



Hydrate 

James W. Wood 
424 N. Missouri 
Atwood, IL 61913 



Chemistry teachers will appreciate this program. 
"Hydrate" allows your student to perform a °/o composition 
lab on a high resolution screen. The student will measure the 
mass of an empty crucible, a crucible with hydrate, and the 
crucible with the dehydrated chemical. Figure 1 is a screen of 




Figure 1. Triple beam balance. 

the triple beam balance used to measure mass. Each run of 
the program will provide a different answer, thus the student 
cannot memorize the answer or pass it along to another 
student. This lab should not be used to replace a chemical 
lab, but to supplement the actual lab experience. This pro- 
gram is written for the Extended Color BASIC computer. 



1 'JAMES W. WOOD, 424 

2 W$(0)="D9R4U9L4" 



N. MISSOURI, ATWOOD, IL, 61913 



3 M(l) 



W$(l) = "D9" 
W$(2) = "R4D4L4D5R4" 
W$(3) = "R4D4L4R4D5L4" 
W$(4) = "D4R4U4D9" 
W$(5) = "R4L4D4R4D5L4" 
W$(6) = "D9R4U4L4" 
W$(7) = "R4D9" 
. W$(8) = "R4D4L4U4D9R4U5" 
W$(9) = "D4R4U4L4R4D9" 
= 100+RND(25) 
M(2) i= 20+RNDU5) 
M(3) = 40+RND(15) 
CLS 

PRINT "% COMPOSITION LAB" 
PRINT "FIND % WATER IN HYDRATE" 
INPUT "NAME";NA$ 



4 CLS 



PRINT 

PRINT 

PRINT 

PRINT"TO MOVE-- 
PRINT 

: PRINT" 10 GRAM 
PRINT "100 GRAM 
PRINT "1 GRAM 
PRINT " 
PRINT "PRESS 'ENTER' 



INSTRUCTIONS FOR BALANCE" 



-USE" 



Q,W" 
A,S" 
Z,X" 
< >" 
TO CONTINUE" 



PRINT "AFTER USING SCALES." 



10 PRINT 

• PRINT 

: PRINT "PRESS ANY KEY TO CONTINUE" 

11 A$ = INKEY$ 

: IF A$ = ""THEN 11 

20 CLS 
PRINT "FIRST FIND THE MASS OF CRUCIBLE. 

PRINT 

PRINT "YOU WILL WANT TO RECORD ALL" 

PRINT "MEASUREMENTS AS THEY ARE MADE." 

PRINT 

21 PRINT 

: PRINT "PRESS ANY KEY TO CONTINUE" 
: M = M(l) 

22 A$ = INKEY$ 

: IFA$ = "" THEN22 

25 GOSUB 2000 

: GOSUB1000 

100 CLS 
PRINT NA$ 
PRINT 

PRINT "NOW MEASURE MASS OF CRUCIBLE 
PRINT "AND THE HYDRATE." 
PRINT 
PRINT "PRESS ANY KEY TO CONTINUE" 

101 M = M(l)+M(2)+M(3) 

102 A$ = INKEY$ 

: IF A$ = ""THEN 102 
105 GOSUB 2000 

: GOSUB 3000 
: GOSUB 1000 

200 CLS 
PRINT NA$ 

PRINT "TIME TO HEAT THE CHEMICAL." 
PRINT "YOU MUST WAIT FOR THE CHEMICAL" 
PRINT "TO HEAT AND COOL PROPERLY." 
PRINT "WATCH THE CHEMICAL TURN COLOR" 
PRINT "AS THE HYDRATED WATER ESCAPES." 

201 PRINT 

: PRINT "PRESS ANY KEY TO CONTINUE" 

202 A$ = INKEY$ 

: IFA$ = "" THEN 202 

205 GOSUB 2000 

: GOSUB 3000 

210 COLOR 4,1 

: LINE(40,110)-(50,180),PSET,BF 

212 LINE(10 5 180)-(80,185),PSET,BF 

220 COLOR 3,1 

: LINE(40,110)-(45,92),PSET 

: LINE-(50,110),PSET 

: LINE-(40,110),PSET 

: PAINT(45,99),3,3 

230 FOR CC = 1 TO 1000 

: PSET(30+RND(31),81+RND(6),2) 

: NEXT CC 

235 COLOR 1,1 

LINE(40,90)-(50,110),PSET,BF 

FOR TI = 1 TO 1500 

NEXT TI 

300 CLS 
PRINT NA$ 
PRINT 

PRINT "FIND MASS OF CRUCIBLE AND THE" 
PRINT "DEHYDRATED CHEMICAL." 
PRINT 
PRINT "PRESS ANY KEY TO CONTINUE" 

301 A$ = INKEY$ 
: IF A$ = ""THEN 301 

302 GOSUB 2000 
COLOR 2,1 

LINE(32,82)-(61,87.,PSET,BF 
M = M(l)+M(3) 
GOSUB 1000 

400 PRINT NA$ 
: PRINT 
: PRINT "NOW TO CALCULATE'' 



40 



TRS-80 Microcomputer News, June 1983 



410 PRINT 

: INPUT "MASS OF EM TY CRUCIBLE" ; N( 1) 
: IF N(l) <> Mfl) THEN PRINT "FUNNY, I GOT";M(l) 
ELSE PRINT "CORRECT" 
420 INPUT "MASS OF CRUCIBLE AND HYDRATE" ; N( 2) 

: IF N(2) <> M(1)+M(2AM(3) THEN PRINT "STRANGE, 
IT SHOULD BE";M(1)+M(2)+M(3) ELSE PRINT 
"CORRECT" 
430 PRINT "MASS OF CRUCIBLE AND CHEMICAL" 
: INPUT "AFTER HEATING" ;N( 3) 
: IF N(3) <> M(1)4M(3) THEN PRINT "TOO BAD, 
ITS";M(1)+M(J) ELSE PRINT "CORRECT" 
440 PRINT "THE % WATER WOULD BE EQUAL TO" 

PRINT "THE MASS Of WATER DIVIDED BY" 
PRINT "M\SS OF THE ORIGINAL CHEMICAL" 
PRINT "TIMES 100." 
450 INPUT "WHAT IS THE MASS OF WATER" ;MW 
460 IF MW = M(2) THEN PRINT "CORRECT" 

: GOTO 475 
470 PRINT "TRY MASS DISH WITH ORIGINAL" 

PRINT "CHEMICAL MINUS MASS DISH WITH" 
PRINT "DEHYDRATED CHEMICAL." 
INPUT "TRY AGAIN, MASS WATER" ;MW 
IF MW <> M(2) THEN PRINT "IT IS";M(2) ELSE 
PRINT "NOW YOU'RE CORRECT ";NA$ 
475 INPUT "MASS ORIGINAL CHEMICAL" ;OC 
480 IF OC = M(2)+M(3) THEN PRINT "CORRECT" 

: GOTO 500 
490 PRINT "TRY SUBTRACTING MASS OF EMPTY" 

PRINT "CRUCIBLE FROM MASS OF CRUCIBLE" 
PRINT "WITH ORIGINAL CHEMICAL." 
INPUT "AGAIN, ORIGINAL CHEMICAL" ;OC 
IF OC <> M(2)+M(3) THEN PRINT "IT 
IS";M(2)+M(3) ELSE PRINT "NOW YOU'RE CORRECT 
";NA$ 
500 INPUT "WHAT IS THE % WATER" ;PW 

510 IF ABS(PW-100*M(2)/(M(2)+M(3))) > 1 THEN PRINT 
"TRY ";M(2);"*100/";M(2)+M(3) 
: GOTO 515 ELSE PRINT "WE MADE IT! ";NA$ 
: GOTO 520 

515 INPUT "% WATER" ; PW 

516 IF ABS(PW-100*M(2)/(M(2)+M(3))) > 1 THEN PRINT 

"ACTUALLY IT IS" ; 100*M(2)/(M(2 )+M(3) ) ; "%" ELSE 

PRINT "NOW YOU'RE CORRECT" 
520 PRINT "ANOTHER LAB (Y/N) 
530 A$ = INKEY$ 

: IF A$ = "Y" THEN RUN ELSE IF A$ = "N" THEN END 

ELSE 530 
540 PRINT "GOODBYE ";NA$ 
900 STOP 

Ql = 
Al = 
Zl - 
COLOR 4,1 
1010 DRAW"BM6,90R80D10L35D20R45U30R134D42R5L5D36L134U 

24L45D30R195U60R7D70L230U15R10U70L27U8" 
1020 LINE( 246 , 131 )-(250 , 131 ) ,PSET 
1030 LINE( 100 , 120 )- (225 , 122) ,PSET, BF 
1040 LINE(100 , 144)-(225 , 146) ,PSET, BF 
1050 DRAW"BM110,152XW$(0);" 
1060 DRAW"BM122,152XW$(1);" 
1070 DRAW"BM134,152XW$(2);" 
1080 DRAW"BM146,152XW$(3);" 
1090 DRAW"BM158,152XW$(4);" 
1100 DRAW"BM170,152XW$(5);" 
1110 DRAW"BM182,152XW$(6);" 
1120 DRAW"BM194,152XW$(7);" 
1130 DRAW"BM206,152XW$(8);" 
1140 DRAW"BM218,152XW$(9);" 
1150 DRAW"BM120,126XW$(0);" 
1160 DRAW"BM152,126XW$(1);" 
1170 DRAW"BM158,126XW$(0);" 
1180 DRAW"BM166,126XW$(0);" 
1190 DRAW"BM182,126XW$(2);" 
1200 DRAW"BM190,126XW$(0);" 
1210 DRAW"BM198,126XW$(0);" 
1220 FORX = 110TO218STEP12 



1230 LINE(X,107)-(X+4,114),PSET,B 

: NEXTX 
1240 DRAW"BM122,95XW$(1); 
1250 DRAW"BM134,95XW$(2)| 
1260 DRAW"BM146,95XW$(3): 
1270 DRAW"BM158,95XW$(4) 
1280 DRAW"BM170,95XW$(5) 
1290 DRAW"BM182,95XW$(6) 
1300 DRAW"BM194,95XW$(7) 
1310 DRAW"BM206,95XW$(8); 
1320 DRAW"BM218,95XW$(9) 
1330 Bl = 107 

B2 = 117 

B3 = 93 

B4 = 124 

B5 = 150 

CI = 107 

1340 LINE(B1,B3)-(B1+9,B3+25),PSET,B 
1350 LINE(B2,B4)-(B2+30,B4+14),PSET,B 
1360 LINE(B1,B5)-(B1+9,B5+14),PSET,B 
1370 LINE(235,131)-(245,122),PSET 
1380 A$ = INKEY$ 

: IF A$ = ""THEN 1380 
1390 IF ASC(A$) = 13 THEN RETURN 
1400 IF A$ = "Q"THEN Ql = Ql-1 

: IF Ql < THEN Ql = ELSE 
LINE(Bl,B3)-(Bl+9,B3+25), PRESET, B 
Bl = Bl-12 

LINE(B1,B3)-(B1+9,B3+25),PSET,B 
GOTO 1470 
1410 IF A$ = "W" THEN Ql = Ql+1 

: IF Ql > 9 THEN Ql = 9 ELSE 
LINE(B1 ,B3)-(Bl+9 ,B3+25) , PRESET, B 
Bl = Bl+12 

LINE(B1,B3)-(B1+9,B3+25),PSET,B 
GOTO 1470 
1420 IF A$ = "A" THEN Al = Al-1 

: IF Al < THEN Al = ELSE 
LINE(B2,B4)-(B2+30,B4+14), PRESET, B 
B2 = B2-30 

LINE(B2,B4)-(B2+30,B4+14),PSET,B 
GOTO 1470 
1430 IF A$ = "S" THEN Al = Al+1 

: IF Al > 2 THEN Al = 2 ELSE 
LINE(B2,B4)-(B2+30,B4+14), PRESET, B 
B2 = B2+30 

LINE(B2,B4)-(B2+30,B4+14),PSET,B 
GOTO 1470, 
1440 IF A$ = "Z" THENZ1 = Zl-1 

: IF Zl < THEN Zl = ELSE 
LINE(C1,B5)-(C1+9,B5+14), PRESET, B 
CI = Cl-12 

LINE(C1,B5)~(CH-9,B5 + 14),PSET,B 
GOTO 1470 
1450 IF A$ = "X" THEN Zl = Zl+1 

: IF Zl > 9 THEN Zl = 9 ELSE 
LINE(C1,B5)-(C1+9,B5+14), PRESET, B 
CI = Cl+12 

LINE(C1,B5)-(C1+9,B5+14),PSET,B 
GOTO 1470 
1460 GOTO 1380 

1470 IF M > Q1*10+A1*100+Z1 THEN 
LINE(235,131)~(245,122),PSET 
LINE( 235, 131 )-(245, 131), PRESET 
LINE(235 , 131 )-(245 , 140) , PRESET 
GOTO 1380 
1480 IF Q1*10+A1*100+Z1 = M THEN 

LINE( 235,1 31 )-(245, 122), PRESET 
LINE(235,131)-(245,131),PSET 
LINE( 235, 131 )~(245, 140), PRESET 
GOTO 1380 
1490 IF Q1*10+A1*100+Z1>M THEN 

LINE(235, 131)- (245, 122), PRESET 
: LINE(235,131)-(245, 131), PRESET 
: LINE(235,131)-(245,140),PSET 
: GOTO 1380 



TRS-80 Microcomputer News, June 1983 



41 



2000 PMODE 3,1 
: PCLS 
: SCREEN 1,0 

2010 COLOR 2,1 

LINE(20,70)-(30,88),PSET 

LINE-(60,88),PSET 

LINE-(70,70),PSET 

LINE-(20,70),PSET 

CIRCLE (45, 65), 5 
2050 RETURN 
3000 COLOR 3,1 

: LINE(32,82)-(61,87),PSET,BF 

3050 RETURN 






Lettering on the Color 
Computer 

Ronald T. Graff 

212 Sandy Lane Apt 104D 

Warwick, Rl 02889 

This program draws nice neat letters in small (up to 21 
characters per line), medium (up to 10 characters per line), 
and large (up to 5 characters per line) sizes on the Extended 
BASIC Color Computer. 

CLS 

: DIM A$(95) 
: GOSUB 1000 

1 CLS 

: PRINT "DO YOU WANT (1) SMALL (2) MEDIUM (3) 

LARGE" 

: INPUT CH 

2 IF CH = 1 THEN Y = -16 
YY = 16 
XX = 12 

S = 1 ELSE IF CH = 2 THEN Y = -32 
YY = 32 
XX = 24 

S = 2 ELSE IF CH = 3 THEN Y = -64 
YY = 64 
XX = 48 
S = 4 ELSE 1 

3 IF CH = 1 THEN CLS 
: PRINT "ENTER NEXT LINE (21 CHARACTERS)" ELSE 
IF CH = 2 THEN CLS 

: PRINT "ENTER NEXT LINE (10 CHARACTERS)" ELSE 
IF CH = 3 THEN CLS 
: PRINT "ENTER NEXT LINE (5 CHARACTERS)" 

4 A$ = "" 
f LINE INPUT A$ 
: CLS 

5 IF A$ = "" GOTO 3 
10 PMODE 4,1 

: SCREEN 1,0 
20 COLOR 0,1 

: IF Y = -YY THEN PCLS 
30 Y = Y+YY 

: P = 

: FOR X = TO (LEN(A$)-1 )*XX STEP XX 
40 XY$ = "S"+STR$(S)+"BM"+STR$(X)+","+STR$(Y) 
50 P = P+l 

: N = ASC(MID$(A$,P,D) 
60 DRAW XY$+A$(N) 
70 NEXT 
80 A$ = INKEY$ 

: IF A$ = CHR$(13) THEN 3 ELSE IF A$ = CHR$(12) 

THEN 1 ELSE 80 
1000 A$(33) = "BR16R8D40L8U40BD48R8D8L8U8" 
1010 A$(34) = "BR8R8D24L8U24BR16R8D24L8U24" 



1020 A$(35) = "BR8R8D16R8U16R8D16R8D8L8D8R8D8L8 
D16L8U16L8D16L8U16L8U8R8U8L8U8R8U16BD24BR8 

R8D8L8U8" 
1030 A$(36) = "BR16R8D8R16D8L16D8R8F8D8G8L8D8L8 
U8L16U8R16U8L8H8U8E8R8U8BD16D8H4E4BD16BR8 

F4G4U8" 
1040 A$(37) = "R16D16L16U16BD4BR40G40D8E40U8BD36 

BL16R16D16L16U16" 
1050 A$(38) = "BR8R8F8D16G4F8E4R8D8G4F4D8L8H4G4 

L16H8U16E4H4U16E8BD8BR4F4D8G4H4U8E4BD24F12G4 

L8H4U8E4" 
1060 A$(39) = "BR16R8D24L8U24" 
1070 A$(40) = "BR16R8G16D24F16L8H16U24E16" 
1080 A$(41) = "BR16R8F16D24G16L8E16U24H16" 
1090 A$(42) = "BR16R8D16E8R8D8G12F12D8L8H8D16L8 

U16G8L8U8E12H12U8R8F8U16" 
1100 A$(43) = "BD24R16U16R8D16R16D8L16D16L8U16L16U8' 
1110 A$(44) = "BD32BR16R8D16G8L8E8U16" 
1120 A$(45) = "BD24R40D8L40U8" 
1130 A$(46) = "BD48BR16R8D8L8U8" 
1140 A$(47) = "BD4BR40D8G40U8E40" 
1150 A$(48) - "BR8R24F8D40G8L24H8U40E8BD8BR4R16 

F4G24U24E4BD12BR20D24G4L16H4E24" 
1160 A$(49) = "BR16R8D48R8D8L24U8R8U32L8U8E8" 
1170 A$(50) = "BR8R24F8D8G32R32D8L40U8E32U4H4L16 

G4D4L8U8E8" 
1180 A$(51) = "BR8R24F8D16G4F4D16G8L24H8U8R8D4F4 

R16E4U8H4L8U8R8E4U8H4L16G4D4L8U8E8" 
1190 A$(52) = "BR24R8D32R8D8L8D16L8U16L24U16E24 

BD8D24L16U8E16" 
1200 A$(53) = "R40D8L32D8R24F8D24G8L24H8U8R8D4F4 

R16E4U16H4L28U24" 
1210 A$(54) = "BR8R24F8D8L8U4H4L16G4D12R24F8D16 

G8L24H8U40E8BD32R20F4D8G4L16H4U12" 
1220 A$(55) = "R40D8G32D16L8U16E32L32U8" 
1230 A$(56) = "BR8R24F8D16G4F4D16G8L24H8U16E4H4 
U16E8BD8BR4R16F4D8G4L16H4U8E4BD24R16F4D8G4 

L16H4U8E4" 
1240 A$(57) = "BR8R24F8D40G8L24H8U8R8D4F4R16E4 

U12L24H8U16E8BD8BR4R16F4D12L20H4U8E4" 
1250 A$(58) = "BD16BR16R8D8L8U8BD16R8D8L8U8" 
1260 A$(59) = "BD16BR16R8D8L8U8BD16R8D16G8L8E8U16" 
1270 A$(60) = "BR34D8G20F20D8H28E28" 
1280 A$(61) = "BD16R40D8L40U8BD16R40D8L40U8" 
1290 A$(62) = "BR6F28G28U8E20H20U8" 
1300 A$(63) = "BR8R24F8D8G16D8L8U8E16U4H4L16G4D4 

L8U8E8BD48BR8R8D8L8U8" 
1310 A$(64) = "BR8R24F8D24G8L16U24R8D8R8U12H4L16 

G4D32F4R28D8L32H8U40E8" 
1320 A$(65) = "BR16R8F16D40L8U24L24D24L8U40E16BD8 

BR4F12D4L24U4E12" 
1330 A$(66) = "R32F8D16G4F4D16G8L32U56BF8R20F4D8 

G4L20U16BD24R20F4D8G4L20U16" 
1340 A$(67) = "BR8R24F8D8L8U4H4L16G4D32F4R16E4U4 

R8D8G8L24H8U40E8" 
1350 A$(68) = "R32F8D40G8L32U56BF8R20F4D32G4L20U40 
1360 A$(69) = "R40D8L32D16R24D8L24D16R32D8L40U56" 
1370 A$(70) = "R40D8L32D16R24D8L24D24L8U56" 
1380 A$(71) = "BR8R24F8D8L8U4H4L16G4D32F4R16E4U4 

L8U8R16D16G8L24H8U40E8" 
1390 A$(72) = "R8D24R24U24R8D56L8U24L24D24L8U56" 
1400 A$(73) = "BR8R24D8L8D40R8D8L24U8R8U40L8U8" 
1410 A$(74) = "BR32R8D48G8L24H8U8R8D4F4R16E4U44" 
R8D24E24R8G28F28L8H24D24L8U56" 
R8D48R32D8L40U56" 
R8D12F12E12U12R8D56L8U36G12H12 



1420 A$(75) = 
1430 A$(76) = 
1440 A$(77) = 

D36L8U56" 
1450 A$(78) = 
1460 A$(79) = 



R8D12F24U36R8D56L8U12H24D36L8U56" 
BR8R24F8D40G8L24H8U40E8BD8BR4R16 

F4D32G4L16H4U32E4" 
1470 A$(80) = "R32F8D16G8L24D24L8U56BF8R20F4D8 

G4L20U16" 
1480 A$(81) = "BR8R24F8D36G4F4G4H4G4L20H8U40E8B 

D8BR4R16F4D32H4G4F4L16H4U32E4" 
1490 A$(82) = "R32F8D16G8L16F24L8H24D24L8U56BF8 

R20F4D8G4L20U16" 



42 



TRS-80 Microcomputer News, June 1983 



1500 A$(83) = "BR8R24F8D8L8U4H4L16G4D8F4R20F8D16 
G8L24H8U8R8D4F4R16E4U8H4L20H8U16E8" 

1510 A$(84) = "R40D8L16D48L8U48L16U8" 

1520 A$(85) = "R8D44F4R16E4U44R8D48G8L24H8U48" 

1530 A$(86) = "R8D36F12E12U36R8D40G16L8H16U40" 

1540 A$(87) = "R8D36E12F12U36R8D56L8U12H12G12 
D12L8U56" 

1550 A$(88) = "R8D12F12E12U12R8D16G12F12D16L8U12 
H12G12D12L8U16E12H12U16" 

1560 A$(89) = "R8D12F12E12U12R8D16G16D24L8U24H16U16' 

1570 A$(90) = "R40D12G32D4R32D8L40U12E32U4L32U8" 

1580 A$(91) = "R40D8L24D40R24D8L40U56" 

1590 A$(92) = "BD4F40D8H40U8" 

1600 A$(93) = "R40D56L40U8R24U40L24U8" 

1610 A$(94) = "BD34E20F20D8H20G20U8" 

1620 A$(95) = "BD48R40D8L40U8" 

1999 RETURN 



SHALL LETT! 



crp 



d_b 







CJI3 










Howard C. Price 
R.R. 2, Box 84 
Warsaw, IN 46580 

This program can be used to vary the printouts using the 
Color Computer and the CGP-115 Color Graphics printer 

10 CLS 

15 PRINT" CHARACTERS PER HNE=80/ (SIZE + 1 ) 

20 INPUT"TYPE SIZE";N 

25 PRINT"THE MAXIMUM NUMBER OF CHARACTERS AND SPACES 

YOU CAN TYPE PER LINE IS " ; INT( 80/ (N+l ) ) 

30 PRINT#-2, CHR$(18) 
40 PRINT#~2,"S";STR$(N) 

50 LINE INPUT"TYPE OR REPEAT(#) ";A$ 

51 IF A$= "#" THEN 74 ELSE 60 
60 PRINT#-2,"P";AS 

64 PRINT*- 2,CHR$( 17) 

66 FOR T = 1 TO 292 

: NEXT T 

67 C$ = INKEY$ 

68 IF C$ = """ THEN GOSUB 90 ELSE 71 

71 PRINT#-2,CHR$(18) 

72 LINE INPUT"TYPE OR REPEAT(#) ";B$ 
7 3 IF B$ = "#" THEN 60 ELSE 74 

74 PRINT#-2,"P";B$ 

75 PRINT#~2,CHR$(17) 

76 FOR T = 1 TO 292 

: NEXT T 

77 C$ = INKEY$ 

78 IF C$ = """ THEN GOSUB 90 ELSE 30 
80 GOTO 30 

90 PRINT#-2,CHR$(18) 

95 PRINT"LINE FEED IS" ; (N + l )*12 

100 INPUT"HOW MUCH ROLL BACK(MAX=900 )" ;M 

110 PRINT#~2,"R0,";STR$(M) 

120 INPUT"TYPE OR ROLL BACK, T OR R";F$ 

130 IF F$ = "R" THEN 100 ELSE RETURN M 




Charles Robert Kelly II 
P.O. Box 1862 
Rolla, MO 65401 



This program is one I have written over the past several 
months. The program will draw any of the sine/cosine/ 
tangent graphs. 

The program is also capable of producing a hard copy 
on a line-printer. For example, the use of the Line-Printer VII 
with the TRS-80 Extended BASIC Color Computer requires 
the use of the Screen Print Program available from 
Radio Shack. In addition the program requires a 16K mem- 
ory as it uses almost 5K. 

Instructions for the operation of the program are in- 
cluded in the program. 

10 CLEAR 500 

P = 

B$ = "" 

A$ = "" 

C$ = "" 

FUNC = 
20 CLS 

: DATA 195, "SINE/COSINE/TANGENT GRAPH BY CHARLES 
ROBERT KELLY II MAY 10, 1982"40 DATA 203," 
CAUTION THIS PROGRAM REQUIRES THE USE OF THE 
SCREEN PRINT PROGRAM" 

50 CLS 
FOR WW = 1 TO 2 
READ QQ,K$ 
FOR J = 1 TO LEN(K$) 

51 PRINTS QQ,LEFT$(K$,J) 

52 FOR KK = 1 TO 3 
: NEXT 

53 NEXT 
: FOR SS = 1 TO 1500 
: NEXT 
: CLS 
: NEXT 

60 GOSUB 990 
70 CLS 

: PRINT"WILL YOU WANT A HARD COPY OF ANY OF THE 
GRAPHS YOU WILL BE CREATING? (Y/N)" 
80 L$ = INKEY$ 

90 IF L$ = "Y" THEN GOTO 1100 

100 IF L$ = "N" THEN A$ = "N" 

'N M THEN GOTO170 

"' THEN GOTO 80 



110 IF L$ 
120 IF L$ 
130 P = 

B$ = "" 

A$ = "" 

C$ = '"" 

FUNC = 

140 DEFUSR0 = 15785 

150 P = 

: PRINT"WILL YOU WANT A PRINT OF THIS GRAPH (Y 

OR N)? n 

: C$ = "'« 
160 A$ = INKEY$ 
170 IF A$ = "Y" THEN P = 1 
180 IF A$ = "N" THEN P = 2 
190 IF P = THEN GOTO 160 
200 FOR X = 1 TO 100 

: NEXT X 
210 CLS 

: PRINT"PLEASE ENTER THE NAME OF THE FUNCTION 

YOU WISH TO VIEW. (SINE , COSINE, TANGENT)" 

: C$ = "" 



TRS-80 Microcomputer News, June 1983 



43 



220 B$ = INKEY$ 

230 IF B$ = "S" THEN C$ = "SINE" 

240 IF B$ = "C" THEN C$ = "COSINE" 

250 IF B$ = "T" THEN C$ = "TANGENT" 

260 IF C$ = "" THEN 220 

270 IF C$ = "SINE" THEN FUNC = 1 

280 IF C$ = "COSINE" THEN FUNC = 2 

290 IF C$ = "TANGENT" THEN FUNC = 3 

300 CLS 

: INPUT "ENTER THE DENSITY YOU WANT THE GRAPH 
PRINTED. THE LOWER THE NUMBER, THE GREATER THE 
DENSITY. (HIT THE ENTER KEY)";DEN 

310 CLS 

: INPUT"ENTER THE AMPLITUDE YOU WANT FOR THE 

GRAPH (-3 TO 3)";AMP 
320 IF AMP<-3 THEN GOTO 310 
330 IF AMP> 3 THEN GOTO 310 
340 CLS 

: INPUT"ENTER THE FREQUENCY THAT YOU WANT ON THE 

GRAPH. HIT THE ENTER KEY."; FREQ 

350 CLS 

: PRINT@192,"THE SCREEN WHICH IS SHOWN HAS THE X 
AND Y SCALES DIVIDED INTO 1/2 UNITS." 

360 FOR X = 1 TO 1000 
: NEXT X 

370 PMODE 4,1 

380 PCLS 

390 SCREEN 1,1 

400 GOSUB 870 

410 GOSUB 930 

420 LINE (127,5)~(127,185),PSET 

430 LINE(7,95)-(247,95),PSET 

440 GOSUB 840 

450 IF FREQ = THEN FREQ = 1 

460 IF AMP = THEN AMP = 1 

470 IF DEN = THEN DEN = 1 

480 FOR X = -180 TO 180 STEP DEN 

490 AX = (X/57. 29578 )*FREQ*6 

500 XP = X/l. 5+127 

510 ON FUNC GOTO 540,520,560 

520 Fl = -(COS(AX)*30*AMP)+95 

530 GOTO 590 

540 Fl = -(SIN(AX)*30*AMP)+95 

550 GOTO 590 

560 Fl = -(TAN(AX)*30*AMP)+95 

570 IF Fl > 186 THEN 600 

580 IF Fl < 5 THEN 600 

590 PSET(XP,F1 ,3) 

600 NEXT X 

610 IF P <> 1 THEN 730 

620 PRINT #-2,CHR$(26) 

630 PRINT #-2,C$;" GRAPH"; 

640 PRINT #-2," FREQUENCY ";FREQ; 

650 PRINT #-2," AMPLITUDE ";AMP; 

660 PRINT #-2," DENSITY ";DEN 

670 FOR X = 1 TO 3 

f PRINT #-2,CHR$(26) 
: NEXT X 

680 POKE 16303,0 

690 Y = USR(0) 

700 FOR XX = 1 TO 10 

710 PRINT#-2,CHR$(26) 

720 NEXT XX 

730 GOSUB 10000 

735 K$ = INKEY$ 

740 IF K$ = ""THEN735 

750 C ^ S PRINT"D0 YOU HAVE ANOTHER GRAPH TO DRAW? 

(Y/N)" 
760 J$ = INKEY$ 
770 FOR X = 1TO 100 

: NEXT X 
780 IF J$ = "Y" GOTO 790 ELSE 810 
790 IF L$ = "N" GOTO 210 
800 IF J$ = "Y" GOTO 150 
810 IF J$ = "N" THEN GOTO 830 
820 GOTO 760 



830 CLS 

: END 
840 LINE(0,0)-(254,190),PSET,B 
850 LINE(2,2)-(252,188),PSET,B 
855 LINE(8,183)-(81,167),PS£T,B 
860 RETURN 

870 FOR X = 7 TO 247 STEP 20 
880 FOR Y = 92 TO 98 
890 PSET(X,Y) 
900 NEXT Y 
910 NEXT X 
920 RETURN 
930 FOR Y = 
940 FOR X = 



5 TO 195 STEP 15 
124 TO 130 



950 PSET(X,Y) 
960 NEXT X 
970 NEXT Y 
980 RETURN 

990 DATA"THIS PROGRAM IS DESIGNED TO DRAW A GRAPH OF 

YOUR DESIGN ON THE VIDEO SCREEN. IN ADDITION IF 
YOU WISH, THE PROGRAM WILL COPY THE GRAPH ONTO A 
LINE PRINTER. THIS PARTICULAR PROGRAM WAS 
DESIGNED FOR THE LINE PRINTER VII" 

991 CLS 

: READ K$ 

: FOR J - 1 TO LEN(K$) 

992 PRINT@0, LEFT$(K$,J) 

993 NEXT 

1000 GOSUB 2000 

1020 DATA 0,"YOU WILL BE ASKED SEVERAL QUESTIONS TO 
SET THE PARAMETERS OF THE GRAPH. SOME OF THE 
QUESTIONS CAN BE ANSWERED BY THE USE OF ONE 
LETTER. IT WILL NOT BE NECESSARY TO HIT THE 
'ENTER' KEY AFTER THESE QUESTIONS." 

1030 DATA 224,"IF YOU DO NOT ENTER ANY VALUES FOR THE 
DENSITY, AMPLITUDE, OR FREQUENCY l(ONE) IS 
USED." 

1031 CLS 
FOR ZZ = 1 TO 2 
READ QQ,K$ 
FOR J = 1 TO LEN(K$) 

1032 PRINT@QQ,LEFT$(K$,J) 

1033 NEXT 

: NEXT 

1050 GOSUB 2000 

1060 DATA "AFTER THE GRAPH HAS BEEN DRAWN AND AFTER 
IT HAS BEEN PRINTED, IF THAT WAS YOUR CHOICE, 
ANOTHER GRAPH MAY BE DRAWN. TO RESET THE 
SEQUENCE, TOUCH ANY KEY ON THE KEYBOARD EXCEPT 
THE 'BREAK' KEY." 

1081 CLS 

: READ K$ 

: FOR J = 1 TO LEN(K$) 

1082 PRINT@0,LEFT$(K$,J) 

1083 NEXT 

1084 GOSUB 2000 
1090 RETURN 
1100 F$ = "" 

: PRINT"HAVE YOU ALREADY ENTERED THE SCREEN 

PRINT PROGRAM? (Y/N)" 
1110 FS = INKEY$ 
1120 IF F$ = "Y" THEN GOTO 150 
1130 IF F$ = "" THEN GOTO 11 10 

1140 CLS 

: PRINT" PUT THE SCREEN PRINT PROGRAM INTO THE 
CASSETTE PLAYER AND PRESS THE PLAY KEY. HIT THE 
•ENTER' KEY WHEN YOU ARE READY.": INPUTW 

1150 CLEAR 200,15743 

1160 CLS 

: PRINT"THE SCREEN PRINT PROGRAM IS NOW 

LOADING " 

1170 CLOADM 
1180 EXEC 

U 90 CLS „^„ MAV 

: PRINT"THE PROGRAM IS NOW LOADED. YOU MAY 
REWIND YOUR TAPE AND TAKE IT FROM THE CASSETTE 



44 



TRS-80 Microcomputer News, June 1983 



PLAYER." 
1200 GOTO 130 
2000 PRINT@480,"HIT 'ENTER' TO CONTINUE"; 

: INPUTW 

: RETURN 
10000 ' LABEL 

10040 DRAW"C3;S4;BM-68,+12" 

10041 IF C$ = "SINE" THEN AA$ = "SIN-GRAPH" 

10042 IF C$ = "COSINE" THEN AA$ = "COS-GRAPH" 
10045 IF C$ = "TANGENT" THEN AA$ = "TAN-GRAPH" 
10050 GOSUB 13000 

10060 RETURN 

13000 'CHAR-GEN 

13001 FOR XX = 1 TO 9 

13002 RESTORE 
: LL = 

13003 READ LL$,CC$ 

13004 IF LL$ = MID$(AA$,XX,1) THEN DRAW CC$ 
: GOTO 13006 

13005 LL = LL+1 

: IF LL < 18 THEN 1300 3 

13006 NEXT 

: RETURN 

13007 DATA" ","BM+7,0" 

13010 DATA"A","U4;E2;F2;D2;NL4;D2;BM+3,0" 

13011 DATA"C","BM+1,-0;H1;U4;E1;R2;F1;BM+0,4;G1;L2; 
BM+6,0"13012 DATA"G","BM+1,-0;H1;U4;E1;R2;F1; 
BM+0,+2;NLl;D2;Gl;L2;BM+6,0" 

1301 3 DATA"H" , "U3 ; NU3 ; R4 ; NU3 ; D3 ; BM+3 , 0" 

13014 DATA"I","BM+l,0;Rl;NRl;U6;NLl;Rl;BM+4,+6" 

13015 DATA"N","U6;Fl;Dl;F2;Dl;Fl;NU6;BM+3,0" 

13016 DATA"O","BM+l,0;Hl;U4;El;R2;Fl;D4;Gl;L2;BM+6,0" 

13017 DATA"P" , "U6 ; R3; Fl ;Dl ; Gl ;L3 ; BM+7 , 3" 

13018 DATA"S","BM+0,-l;Fl;R2;El;Ul;Hl;L2;Hl;Ul;El;R2; 
Fl;BM+3,+5" 

1 3019 DATA"T" , "BM+2 , +0 ; U6 ; NL2 ; R2; BM+3 , +6" 

13020 DATA"-","BM+0,-3;R4;BM+3,+3" 

13021 DATA"R","U6;R3;Fl;Dl;Gl;L2;NLl;F3;BM+3,0" JH 



agic Square 



Robert K. Phelps 
143 Forest Park 
7800 Tayloe Drive 
Manassas, VA 22111 



Magic Square is designed for use with the PC-2 with a 
printer/plotter attached. If the printer/plotter is not hooked up 
to the computer, the plotter commands will be ignored. Start 
the program by pressing the (de F ) (space ) keys. 

The printing will normally be done using black and red, 
but the pens can be switched to get other color combinations. 
Also, you can change the COLOR commands in the program 
to get different color effects. 

4 * 4 MAGIC SQUARE STARTING WITH 100 



100 


114 


113 


103 


111 


105 


106 


108 


107 


109 


110 


104 


112 


102 


101 


115 



ALL ROWS, COLUMNS, DIAGONALS 
ADD TO CONSTANT 430 



The magic square is a true magic square. All the rows, 
columns, and diagonals add to 430 in the sample square. 
Also, the four center squares, or the four corner cells (four 
squares making up a "corner") will also add to 430. In fact, 
the sum of any symmetrical group of four squares will equal 
the constant. In the sample square, the two middle cells in the 
top row (114 + 113) can be added to the two middle cells in 
the bottom row (102 + 101) to give constant 430 (1 14 + 113 
+ 102 + 101 = 430). 

This program can be used to compute a magic square 
starting with ANY number, but I have decided to limit the 
range of starting numbers to 1 - 984 because of practical 
considerations. If you choose the number 984 as the starting 
number, the computer will develop a square using numbers 
in the range 984 - 999. Any starting number greater than 984 
causes a rollover effect into four-digit numbers or more. I 
have decided to use numbers with three digits or less be- 
cause of the limits on paper width. I would have to re-write 
most of the program to handle numbers with more than three 
digits. I feel the number range 1 - 984 is sufficient for practical 
requirements. 

The program requests a number in the range 1 - 984. 
You type in the number and press the fENTER) key. The 
program then causes the printer to draw a diagram with four 
rows and four columns. Then the computer does the math 
work and enters the numbers in the cells or squares. In the 
sample square, I used 100 as the starting number, and the 
computer developed a square using numbers in the range 
100 - 115. The computers also figured the constant, in this 
case 430. 

This makes an excellent demonstration program. You 
can load the program from tape, press the CD ef ) (space) 
keys to start the run and allow anybody to pick a number. You 
type in the number, and the computer responds almost im- 
mediately by drawing the diagram. This is fun to watch. After 
the magic square is finished, it can be torn off and handed out 
as a "personal magic square." It is a real intellectual chal- 
lenge to determine how many ways numbers can be added 
to form the magic constant. The constant will be different for 
each starting number. I could set up a program to make a 
magic square that would add to a given constant, but this 
program would be of interest only to "magic square fiends." I 
have tried to develop a program that is of general interest, 
and if the reader wants to dig into magic squares, there are 
plenty of good books on the subject. 



20 " "CLEAR 

: PAUSE "4 * 4 MAGIC SQUARE" 
: PAUSE "STARTING WITH ANY NUMBER" 
30 INPUT "ENTER NUMBER (1-984)=" ;Y 

: IF Y>984PAUSE "INVALID ENTRY!" 
: GOTO 30 
40 TEXT 

LF 10 

CSIZE 2 

COLOR 
50 GRAPH 

COLOR 

CSIZE 2 

GLCURS0R (0,0) 

SORGN 

60 LINE (0,0)-(0,200)~(200,200)-(200,0)-(0,0) 
70 LINE (0,0)-(0,150)-(200 J 150)-(200,100)-(0,100) 
80 LINE (0,100)-(0,50)-(200 ) 50)-(200 ) 0)-(0,0) 
90 LINE (150,0)-(150,200)-U00,200)-(100,0) 
100 LINE (100,0)-(50,0)-(50,200)-(0,200) 



TRS-80 Microcomputer News, June 1983 



45 



110 TEXT 

COLOR 3 
CSIZE 1 
LF -1 

USING "####" 
120 LPRINT "4 * 4 MAGIC SQUARE STARTING WITH";Y 
130 A=Y 

B=Y+14 

C=Y+13 

D=Y+3 

E=Y+11 

F=Y+5 

G=Y+6 

H=Y + 8 

140 I=Y+7 

J=Y+9 

K=Y+10 

L=Y+4 

M=Y+12 

N=Y+2 

0=Y + 1 

P=Y+15 

Q=A+B+C+D 

150 LF 4 

: CSIZE 2 
: LPRINT A;B;C;D 
160 LF 1 

: CSIZE 2 
: LPRINT E;F;G;H 
170 LF 2 

: CSIZE 2 
: LPRINT I;J;K;L 
180 LF 1 

: CSIZE 2 
: LPRINT M;N;0;P 
190 LF 2 

: CSIZE 1 

: LPRINT "ALL ROWS, COLUMNS, DIAGONALS" 
200 LPRINT "ADD TO CONSTANT" ; USING ",######" ;Q 
210 CSIZE 2 

COLOR 
LF 6 
END 



Bargraph 

Dennis L. Hargens 
3004 Linda Drive 
Ennis, TX 75119 



This program for an Extended Color BASIC Computer 
plots a bar graph of data that is entered from the keyboard. 
The vertical axis is labeled with the units of the graph and their 
exponent. The value of each line increment is also displayed, 
although this value must be multiplied by the exponent to 
obtain the correct value in relation to the graph. Each plotted 
value on the graph is labeled with a one character symbol on 
the horizontal axis. The title of the graph is displayed at the 
bottom of the graph. The title string can also be used to label 
the horizontal axis. The minimum, maximum, average, and 
last value are displayed at the bottom of the screen in expo- 
nential format. 

10 DIM DA(13),LB$(13),UN$(8) 

20 CLS 

30 PRINT @ 226, "WHAT IS THE GRAPH'S NAME" 

40 INPUT NAME$ 

50 Y=l 

60 CLS 

70 PRINT @ 135, "WHAT ARE THE UNITS" 

80 PRINT @ 202, "OF THE GRAPH?" 



90 PRINT @ 263, "PRESS <ENTER> AFTER" 
100 PRINT @ 330, "EACH LETTER." 
110 PRINT @ 389, "PRESS XX WHEN FINISHED" 
120 INPUT UN$(Y) 
130 IF UN$(Y)="XX" THEN 160 
140 Y=Y+1 
150 GOTO 120 
160 Y=Y-1 
170 CLS 

180 PRINT @ 225, "HOW MANY DATA P0INTS( 1-13)' 
190 INPUT DP 
200 REM DATA ENTRY 
210 CLS 

220 FOR IN=1T0DP 
230 INPUT "DATA POINT =";DA(IN) 
240 INPUT "1-CHARACTER LABEL=" ;LB$( IN) 
250 SUM=SUM+DA(IN) 
260 IF IN=1 THEN 1030 
270 IF MAX>DA(IN) THEN 290 
280 MAX=DA(IN) 
290 IF MIN<DA(IN) THEN 310 
300 MIN=DA(IN) 
310 NEXT IN 
320 AVE=SUM/(IN-1) 
330 FAC=21/ (MAX-MI N) 
340 REM VERTICAL AXIS EXPONENT 
350 CLS(0) 
360 VA=MIN 

370 IF VA<10 THEN 390 
380 VA=VA/10 
:DE=DE+1 
:GOTO370 

IF VA>=1 THEN 410 

VA=VA*10 
:DE=DE-1 
:GOTO 390 

POKE 1280,5 

IF DE>=0 THEN 450 

POKE 1312,45 

GOTO 460 

POKE 1312,43 

EX=ABS(DE) 

C0=EX+48 
:P0KE 1344, CO 

REM LINE INCREMENT VALUES 

IC=(MAX-MIN)/10 

FOR V0=1 TO 11 

CZ=INT(VA)+48 
:SP=1347-(VO-l)*32 

CO=(VA-INT(VA))*10 
: CT=C0 

:C0=INT(C0)+48 
:CT=(CT-INT(CT))*10 
:CT=INT(CT)+48 



390 
400 



410 
420 

430 
440 
450 
460 
470 

480 
490 
500 
510 

520 




46 



TRS-80 Microcomputer News, June 1983 



530 IF V0=1 OR ED=DE THEN 560 
540 IF ED-DE>=2 THEN 570 
550 POKE SP+1,46 

POKE SP+2,CT 
POKE SP-1,CZ 
POKE SP,CO 
GOTO 580 
560 POKE SP-1,CZ 

.-POKE SP,46 

:POKE SP+l,CO 

:POKE SP+2,CT 

:GOTO580 
570 POKE SP+2,46 

:POKE SP+1,CT 

:POKE SP,CO 

:POKE SP-1 ,CZ 
580 VA=MIN+VO*IC 

:ED=0 
590 IF VA<10 THEN 610 
600 VA=VA/10 

:ED=ED+1 

.-GOTO 590 
610 IF VA>=1 THEN 630 
620 VA=VA*10 

:ED=ED-1 

:GOTO 610 
630 NEXT VO 
640 XF=12 

:XL=13 
650 FOR LI=1376 TO 1407 
660 POKE LI, 143 
670 NEXT LI 

680 REM DATA PLOT ROUTINE 
690 FOR PL=1T0DP 
700 NU=ASC(LB$(PL)) 
710 PO=1380+2*PL 
720 POKE PO,NU 
730 IF DA(PL)=MIN THEN 800 
740 GY=INT((DA(PL)-MIN)*FAC) 
750 FOR LA=21 TO (21-GY) STEP -1 
760 SET(XF,LA,3) 
770 SET(XL,LA,3) 
780 NEXT LA 
790 GOTO820 
800 SET(XF,21 ,3) 
810 SET(XL,21,3) 
820 XF=XF+4 

: XL=XL+4 
830 NEXT PL 

840 REM VERTICAL AXIS LABEL 
850 FOR DM=1 TO Y 
860 NU=ASC(UNS(DM)) 
870 PO=992+DM*32 
880 POKE PO,NU 
890 NEXT DM 
900 REM AVERAGE PLOT 
910 GAV=21-INT((AVE-MIN)*FAC) 
920 FOR AL=14 TO 62 STEP4 
930 SET(AL,GAV,4) 
940 SET(AL+1,GAV,4) 
950 NEXT AL 
960 REM DATA LIST 
970 PRINT @ 384, NAME$ 

980 P$="AVE=##.## MAX=##.## " 

990 0$="MIN=##.## LST VAL=##.##~"" 

1000 .PRINT @ 416, USING P$; AVE, MAX 
1010 PRINT @ 448, USING 0$;MIN,DA(DP) 
1020 GOTO 1020 
1030 MIN=DA(1) 
1040 GOTO 270 



USA Flag for the Color 
Computer and MC-10 

Calvin C. Epple 
P.O. Box 86 
Smithsburg, MD 21783 

I'm having a ball with my TRS-80 Extended BASIC Color 
Computer and greatly appreciate the interesting articles, in- 
cluding programs, carried in your magazine. I have devel- 
oped some interesting programs, too, and would like to share 
one with other readers of the TRS-80 Microcomputer News. 

USA Flag is shown on this month's cover. 

1 'USA BASIC BY CAL EPPLE 3,13,83 

2 'FOR NON-EXTENDED AS WELL AS EXTENDED BASIC COCO'S 
10 CLS 

20 FOR X = 2 TO 61 

: FOR Y =2 TO 27 
30 SET (X,Y,4) 

: NEXT Y,X 
40 FOR X = 2 TO 61 

: FOR Y = 4 TO 24 STEP 4 
50 SET (X,Y,5) 

: NEXT Y,X 
60 FOR X = 2 TO 27 

: FOR Y = 2 TO 15 
70 RESET(X,Y) 

: NEXT Y,X 
80 FOR X = 4 TO 24 STEP 4 

: FOR Y = 4 TO 12 STEP 2 
90 SET (X,Y,5) 

: NEXT Y,X 
100 FOR X = 6 TO 22 STEP 4 

: FOR Y = 5 TO 11 STEP 2 
110 SET (X,Y,5) 

: NEXT Y,X 

"AMERICA, THE BEAUTIFUL"; 
TO 59 



120 
130 
140 
150 
160 
170 
180 
190 

200 

210 

220 

230 

240 

250 

260 



PRINT@485 
FOR X = 1 
READ N,L 
SOUND N,L 
NEXT X 
RESTORE 
GOTO 180 
DATA 147, 



.66 



147, 18 
DATA 133 

147, 12 
DATA 147 

108, 6, 
DATA 180 

185, 12 
DATA 19 3 

170, 6, 
DATA 185 

176, 12 
DATA 17 6 

147, 6, 
DATA 159 

176, 12 



12, 

108, 

12, 

147, 

18, 

108, 
12, 
147, 
18, 

170, 
12, 
176, 



, 18, 

108, 

, 12, 



125 
12, 
159 



147 

6, 
147 

12 
125, 6, 
12, 185 
185, 12 

12 
19 3, 6, 
12, 176. 
170, 12, 159 

12 



6, 

125 

12 



125, 
12 
170, 



12, 147, 12, 
12, 147, 24, 



125, 12, 
12 
193, 12 



147, 12, 147, 18, 
159, 12, 185, 24, 



185, 
. 12 



18, 159, 6, 159, 
147, 12, 147, 12 
12, 176, 12, 147 



12, 176, 12, 
12, 147 
176, 



12 



12 



12, 



176, 18, 

, 176, 24, 

176, 18, 



12, 185, 12, 176 



24, 

J3 



TRS-80 Microcomputer News, June 1983 



47 




















Radio /haek 

TRS-80 Microcomputer News 

P.O. Box 291 

Fort Worth, Texas 761 1 3-291 



FIRST CLASS 
U.S. POSTAGE 

PAID 

Radio Shack 
A Dlv. of Tandy Corp 



ADDRESS CHANGE 

D Remove from list □ Change as shown 

Please detach address label and mail to address shown above 



TRS-80" Computer Camp 

This summer let Radio Shack's qualified instructors introduce your child to the world of computers at a TRS-80 BASIC or a 
TRS-80 LOGO Computer Camp. One TRS-80 Color Computer will be available for every two campers to give each participant 
the opportunity for hands on experience, No prior computer knowledge is required. 



TRS-80 LOGO 
Computer Camp 

For Ages 8-1 1 

The Color LOGO Language 

Color LOGO provides unique features that are not found in 
any other LOGO language. There's the "doodle" mode and 
the fascinating "hatch" command that creates multiple tur- 
tles. The result is a LOGO for the TRS-80 Color Computer that 
will excite young minds and help them welcome the chal- 
lenge of learning. 

Computer Concepts for Young People 

Radio Shack's Color LOGO is a revolutionary computer 
programming language for children. It is designed to help 
young minds grasp graphic relationships and develop 
problem-solving skills. Through manipulation of "turtle" 
graphics, youngsters learn .to write simple programs. By 
doing so, the computer becomes a friendly learning tool, and 
youngsters gain insight into advanced concepts. 

Sessions are Self-Paced . . . And Fun 

Each child will progress at his or her own pace under the 
guidance of an experienced, professional educator. The cur- 
riculum, designed by educators, employs a play-oriented 
approach to encourage children to learn and use the 
computer. 






TRS-80 BASIC 
Computer Camp 

For Ages 12-15 

Computer Concepts for 
Young People 

Extended Color BASIC is an exciting and powerful pro- 
gramming language that youngsters can readily appreciate 
Dynamic graphics, music and sound effects, and progres- 
sive programming techniques let students write simple 
problem-solving programs or create animated games. 

Sessions are Structured 
And Not Intimidating 

The five-day camp will consist of professionally-designed ac- 
tivities to keep the pace interesting and challenging. 

Extended Color BASIC Language 

Each camper will learn to use such BASIC features as 
assignment statements, looping, branching, subroutines, 
READ/DATA statements, editing, string packing, and more to 
create their own programs. 

Introduction to LOGO 

As an added bonus, each attendee will be introduced to 
Radio Shack's Color LOGO programming language. This will 
give the campers insight into a second computer language. 



I 



Radio 
Aaaek 



COMPUTER 
CENTER 



Enroll now at your nearby 
Radio Shack Computer Center.